Hello, So i'm trying to make a game i want to make a button that kills you when you click it So i did a ordinary script.

But the script did not work for the button in the screen gui

debounce = false

script.Parent.Kill.MouseButton1Down:connect(function() game.Players.LocalPlayer.Character.Humanoid.Health = 0 end)

4 comments

0

Any errors in Output?

0

Hmm let me go check

0

Tbh formating your code correctly would make it easier to read

0

Also if you used a server script thats wrong. You can't detect if the player clicks the button using them. Use a local script