Hello! I am the secondary scripter for my next game. I found a bug that will affect the next thing to finish the teleporter elevators.
The Problem

The Code
local Popup = script.Parent.Leave
local Ready = true
function onTouch(hit)
local h = hit.Parent:FindFirstChild("Humanoid")
if h ~= nil and Ready == true then
Ready = false
local plyr = game.Players:FindFirstChild(h.Parent.Name)
local c = Popup:clone()
c.Parent = plyr.PlayerGui
local newPlayer = Instance.new("ObjectValue")
newPlayer.Parent = script.Parent.Players
newPlayer.Name = plyr.Name
newPlayer.Value = plyr
Ready = true
end
end
script.Parent.Touched:connect(onTouch)
If you know a fix, please let me know.
WE
(Not scripted by me, scripted by the primary scripter who is trying to help)