I just started scripting and I tried to make a basic click detoctor activated kill script. It doesn't give me any errors but it also doesn't work.
local yesclick = game.workspace.Click_Event_Test.ClickDetector.MouseClick
local Player = game:GetService'Players'.LocalPlayer
local Char = Player.Character
function killself()
Char.Humanoid.Health = 0
end
yesclick:Connect(killself)

1 comment
just do workspace and not game.Workspace