oops wrong again, too lazy to use coroutines atm :P
local part = part --change this to whatever part they should touch
local gui = gui --change this to whatever gui that will pop up
local time = 1 --change this to how long the players will see the gui, in seconds
part.Touched:connect(function()
for _,v in pairs(game.Players:GetChildren())
if v.Character and v.Character:FindFirstChild("Humanoid").Health > 0 then
v.PlayerGui.gui.Visible = true
end
end
wait(time)
for _,v in pairs(game.Players:GetChildren())
if v.Character and v.Character:FindFirstChild("Humanoid").Health > 0 then
v.PlayerGui.gui.Visible = false
end
end
end)
|