function onTouch(Part)

script.Disabled = true

if Part.Parent:FindFirstChild(“Humanoid”) ~= nil then

soul = Part.Parent.Humanoid

if game.Players:GetPlayerFromCharacter(Part.Parent) ~= nil then

Playa = game.Players:GetPlayerFromCharacter(Part.Parent)

if Playa.PlayerGui:FindFirstChild(“ScreenGui”) ~= nil then

Playa.PlayerGui.ScreenGui:remove()

end

end

end

wait(0.1)

script.Disabled = false

end

script.Parent.Touched:connect(onTouch)

I was trying to do is when a player touches the brick their teleport gui will disappear and when the player dies the teleport gui will pop back up on their screen.

1 comment

0

You did not change a thing. Please give a good description. What do you mean it was crashing. Is there errors. What script type are you using. Give us all info possible!!