After clicking on the yellow orb thingy, a server script triggers an event on the local script to fade to a black screen. Afterwards, the server script moves the player to the upper floor. Even though they worked before using the teleporter, all of the proximity prompts no long work. Even when I disable the local script, which fades to the black screen, the bug still occurs.
-- Teleporter script --
local rs = game:GetService("ReplicatedStorage")
local Event = rs:WaitForChild("BlackGui")
local Time = 1
script.Parent.MouseClick:Connect(function(Player)
Event:FireClient(Player, Time, script.Parent)
task.wait(1.1)
local HRP = Player.Character:WaitForChild("HumanoidRootPart")
HRP.Position = Vector3.new(HRP.Position.X,48.127,HRP.Position.Z)
end)
-- Script used in all of the doors (proximity prompts) --
local Door = script.Parent.Parent.Parent:WaitForChild("Union")
local Prompt = script.Parent
local Door2 = Door.Parent:WaitForChild("Door2")
local Sound = script.Parent.Parent:WaitForChild("DoorOpen")
local TweenService = game:GetService("TweenService")
local Tweeninfo = TweenInfo.new(2)
local Goal1 = {}
Goal1.Position = Door2.Position
local Goal2 = {}
Goal2.Position = Door.Position
local Tween1 = TweenService:Create(Door,Tweeninfo,Goal1)
local Tween2 = TweenService:Create(Door,Tweeninfo,Goal2)
local CanOpen = true
Prompt.Triggered:Connect(function()
print("Triggered")
if CanOpen == true then
CanOpen = false
Tween1:Play()
Prompt.Enabled = false
Sound:Play()
wait(12)
Tween2:Play()
Sound:Play()
wait(2)
Prompt.Enabled = true
CanOpen = true
end
end)