Idk how to do it, I'm pretty new to scripting so. I don't have a script example, it's just a question. But anyway, here's my script, no errors its just not working
local part = game.Workspace.GunKill.Part
local gui = game.StarterGui.Deathgui.Frame
game.Players.PlayerAdded:Connect(function(plr)
part.Touched:Connect(function()
gui.Script.Disabled = false
part:Destroy()
workspace.GunCock:Play()
wait(5)
workspace.Gunshot:Play()
wait(2)
plr:Kick("Ending 5, Killed Self")
end)
end)
GUI's script:
script.Parent.Visible = true

1 comment
Why are you running a part.Touched function inside a PlayerAdded function?