Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I make someone take damage from click detector when they press a object?

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.