How can I make someone take damage from click detector when they press a object?
This should work.
local clickDetector = script.Parent local function onClicked(player) player.Character.Humanoid.Health -= 10 end clickDetector.MouseClick:Connect(onClicked)