I'm making a police-criminal game like Jailbreak, and I'm making the part where when you escape it prompts you with an escape GUI to let you know.
The problem is, the event's running even if I don't touch the part where you escape
LocalScript in The GUI text label:
local Player = game:GetService("Players").LocalPlayer
local Prisoner = game.Teams.Prisoners
game.Workspace.CrimWall.Touched:Connect(function()
if Player.Team == Prisoner then
script.Parent.Parent.Visible = true
script.Parent.Visible = true
wait(5)
script.Parent.Parent.Visible = false
script.Parent.Visible = false
end
end)
NOTE THAT: THE REASON ISN'T BECAUSE IT'S TOUCHING SOMETHING ELSE, THE GUI COMES WHEN YOU PASS A POINT, BUT NOTHING IS AT THAT POINT, ITS NOT EVEN ANYTHING UNIONED, AND THE GUI IS COMING UP

3 comments
Something else may be touching the wall, you can add a check to see if they are aplayer or not.
its like you pass a point and then it happens, but that point isnt the thing
It doesn't have to be a player touching the wall. Any basepart in your experince could trigger the function.