script.Parent.MouseButton1Click:connect(function()
local Player = script.Parent.Parent.Parent.Parent.Parent
local g = Player.Character
local leg = g:FindFirstChild('Right Leg')
leg:Destroy()
end)
This is in a Gui called Riddle and in a GUI called Riddles and in StarterGui I am trying to make it so when clicked it takes off the left leg. For some reason it is not working at all please help

5 comments
t edited my question because I noticed it was in a different GUI. Can you still fix it?
Try changing :FindFirstChild to :WaitForChild, make the script a local script and change local Player = script.Parent.Parent.Parent.Parent to local Player = game.Players.LocalPlayer
Alright ill try that
Can I add you?
I accepted your friend request.