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)
FerbZides
(FerbZides)
October 31, 2020, 12:37pm
#2
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.
Ashp116
(Ashp116)
October 31, 2020, 12:40pm
#4
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
i just had to do player.Character:WaitForChild("Body Colors")
Ashp116
(Ashp116)
October 31, 2020, 12:43pm
#8
can u mark the “Solution” button if its fixed