RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make the really red parts give a value of 1 when deleted"
-- server script game.Workspace.ChildAdded:Connect(function(part) if part:IsA("Part") and part.BrickColor == BrickColor.new("Really red") then part.Anchored = true part.Touched:Connect(function(hit) local player = game.Players:GetPlayerFromCharacter(hit.Parent) if player then part:Destroy() player.leaderstats.Value.Value = player.leaderstats.Value.Value + 1 end end) end end)