Why would I need to put a wait(1) here for this script to work when you press a button? I'd appreciate if anyone could explain to me why I must put a wait(1)
wait(1)
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Button = script.Parent
local BodyColors = Character:FindFirstChild("Body Colors")
Button.MouseButton1Click:Connect(function()
BodyColors.HeadColor3 = Color3.new(1, 232/255, 220/255)
BodyColors.LeftArmColor3 = Color3.new(1, 232/255, 220/255)
BodyColors.LeftLegColor3 = Color3.new(1, 232/255, 220/255)
BodyColors.RightArmColor3 = Color3.new(1, 232/255, 220/255)
BodyColors.RightLegColor3 = Color3.new(1, 232/255, 220/255)
BodyColors.TorsoColor3 = Color3.new(1, 232/255, 220/255)
end)

2 comments
Probably to prevent the common error of
Character (a nil value). Just simply doCharacter = Player.Character or Player.CharacterAdded:Wait()Because the player didn't load