When a player walks over a spawn it sets a bool value (IsInMatch) to false. When the bool value is set to true the GUI is Invisible, but when the boolvalue is false the GUI is visible. Although, that's not the problem. the problem is that when I walk over my spawn, it won't change the value of the boolvalue, hence letting the GUI not disappear.
simplealgorithm added to the script but it still doesn't work.
here is the local script inside the spawn:
local IsInMatch = game.Players.LocalPlayer.IsInMatch
function OnTouch(part)
IsInMatch.Value = false
end
-- simplealgorithm added more to the script below but it doesn't seem to work
local Spawn = script:FindFirstAncestor("Spawn")
Spawn.Touched:Connect(function(hit)
if (hit ~= nil) then
OnTouch(Spawn)
end
end)

1 comment
Local Scripts need to be under the player for them to run. Put this under StarterPlayerScripts and correct the "Spawn" variable path.