How can I make someone take damage from click detector when they press a object?
COMMUNITY QUESTION
How can I make someone take damage from click detector when they press a object?
1 answer
This should work.
local clickDetector = script.Parent
local function onClicked(player)
player.Character.Humanoid.Health -= 10
end
clickDetector.MouseClick:Connect(onClicked)
This discussion is preserved as it was. New answers, comments, and votes are closed.
