-
What do you want to achieve? I’m trying to make a script that, when a tool is unequipped, it will change the transparency of all body parts and change WalkSpeed.
-
What is the issue? I made 2 print statements to check what parts were and weren’t working. 1 was for when the tool was unequipped, and the other was when I got the players character. It printed the first one but not the second.
-
What solutions have you tried so far? I searched it up on Google but got nothing.
script.Parent.Unequipped:Connect(function()
print("Working 1")
local Player = script.Parent.Parent.Parent
local Character = Player.CharacterAdded:wait()
print("Working 2")
Character:FindFirstChild("Humanoid").WalkSpeed = 14
Character:FindFirstChild("LeftFoot").Transparency = .1
Character:FindFirstChild("LeftHand").Transparency = .1
Character:FindFirstChild("LeftLowerArm").Transparency = .1
Character:FindFirstChild("LeftLowerLeg").Transparency = .1
Character:FindFirstChild("LeftUpperArm").Transparency = .1
Character:FindFirstChild("LeftUpperLeg").Transparency = .1
Character:FindFirstChild("LowerTorso").Transparency = .1
Character:FindFirstChild("RightFoot").Transparency = .1
Character:FindFirstChild("RightHand").Transparency = .1
Character:FindFirstChild("RightLowerArm").Transparency = .1
Character:FindFirstChild("RightLowerLeg").Transparency = .1
Character:FindFirstChild("RightUpperArm").Transparency = .1
Character:FindFirstChild("RightUpperLeg").Transparency = .1
Character:FindFirstChild("UpperTorso").Transparency = .1
Character:FindFirstChild("Head").Transparency = .1
end)
This is the entire script, and there are no errors in the output.