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
script.Parent.Touched:connect(function(hit) local plr = game.Players:FindFirstChild(hit.Parent.Name) plr.PlayerGui.Deathgui.Frame.Script.Disabled = false end)
not sure if you wanted to set a script to
disabled, just working off what you wrote
try this
partnamehere.Touched:Connect(function(hit) local plr = game.Players:GetPlayerFromCharacter(hit.Parent) if plr then GUInamehere.Visible = true end end