I want to make the button kill player that clicks it
This is what i have so far and it isnt working (new to lua):
local clickDetector = workspace.Part.ClickDetector local player = game.Players.LocalPlayer
function onMouseClick() player.Health = 0 end
clickDetector.MouseClick:connect(onMouseClick)

2 comments
Is it a local script?
yes