Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Clickable brick won't work? [RESOLVED

Asked by 9 years ago
script.Parent.ClickDetector.MouseClick:connect(function(player)
    player.Head:remove()

end)
0
Everything is there, it just won't work. Any ideas? WolfgangVonPrinz 0 — 9y
0
Remember to include any output when asking! You would have gotten something like, 'head is not a valid member of Player' Perci1 4988 — 9y

1 answer

Log in to vote
2
Answered by 9 years ago

The problem is that the player is the player in players not the character in workspace so instead do

script.Parent.ClickDetector.MouseClick:connect(function(player)
    player.Character.Head:remove()
end)
0
Oh, I understand. Thanks WolfgangVonPrinz 0 — 9y
Ad

Answer this question