Infinite yield possible on waitforchild for bodycolors

Infinite yield possible on ‘Workspace.WindingTheRopes:WaitForChild(“BodyColors”)’ - Studio
[when clicking]

How would I fix this script to access body colors and change them accordingly?

local ClickDetector = Instance.new("ClickDetector")
ClickDetector.Parent = script.Parent

ClickDetector.MouseClick:Connect(function(player)
	player.Character:WaitForChild("BodyColors").HeadColor3 = Color3.new(0.133333, 0.623529, 1)
end)

Does this Object even exist though?

2 Likes

I changed the WaitForChild("Humanoid") and the humanoid worked properly. Since Humanoid and body colors are parented to the same object I assumed this would work just fine. In game BodyColors are there in the character.
image

try this

local ClickDetector = Instance.new("ClickDetector")
ClickDetector.Parent = script.Parent

ClickDetector.MouseClick:Connect(function(player)
	player.Character:FindFirstChildOfClass("Body Colors").HeadColor3 = Color3.new(0.133333, 0.623529, 1)
end)
2 Likes

oh there is a space
oops


i just had to do player.Character:WaitForChild("Body Colors")

can u mark the “Solution” button if its fixed