I am working on a ProximityPrompt based teleportation system, and everything seems to work save for one. It does not work in it's usual spot, but works in other rooms. I have tried everything, but it only seems to work near the spawn point.
local Soin = game.Workspace.Pori["Button Press"]
local ProximityPrompt = script.Parent
local Part = game.Workspace.Pairt.NeonPoart
ProximityPrompt.Triggered:Connect(function(Player)
Soin:Play()
ProximityPrompt.Enabled = false
for i = 1,10 do
game.Lighting.ColorCorrectionEffect.Brightness = game.Lighting.ColorCorrectionEffect.Brightness - 0.1
wait()
end
Player.Character.HumanoidRootPart.Position = game.workspace.SpawnTP2.Position
wait(1)
for i = 1,10 do
game.Lighting.ColorCorrectionEffect.Brightness = game.Lighting.ColorCorrectionEffect.Brightness + 0.1
wait()
end
wait(1)
ProximityPrompt.Enabled = true
end)
This is my code, is there anything within that could ruin it?
I've moved the part it's connected to, it works fine at the location where the bulk of the other prompts are and also where spawn is nearby, but does not work in other rooms. I have tried to make rooms from scratch, and have tried duplicating the working location but to no avail.
RequiresLineOfSight
prop., which is True by default