Hi! I’m learning how to script and making small projects!
I want to make a script that when a Player clicks on a Part, the HumanoidDescription stored in the ServerStorage is applied to the Player Humanoid.
I don’t know what is wrong or what I need to add to make it work.
Here is the script:
local detector = script.Parent.ClickDetector
local costume = game.ServerStorage.Costume
detector.MouseClick:Connect(function(click)
if click.Parent:FindFirstChild("Humanoid") then
click.Parent:FindFirstChild("Humanoid"):ApplyDescription(costume)
end
end)
ClickDetector.MouseClick returns the Player who triggered the event, not a part of the character. That means you have to apply the description to click.Character:FindFirstChild("Humanoid").
I added click.Character.Humanoid.RigType.R6 = true to the script, everything else that the script is supposed to do works fine but there is an error: R6 cannot be assigned to - Server - Script:7