Update: Messed around with it some more - the script ONLY halts the doors once it's fired. If the player resets, or isn't teleported at all, the doors work. It's also probably worth mentioning the doors use ProximityPrompts as a method of activation.

Hello again - I've ran into yet another issue I'm hoping y'all can help me with.

I've created a teleport script that will cause a Gui to fade in/out when the player touches it. The script is activated when a player opens a door [ to prevent the players limbs from clipping through the door and touching the teleport block before opening it ]. The problem at hand is the fact that as soon as any of the teleportation scripts are enabled, the doors just stop functioning. There are no errors in the console, and any attempts to print something through the doors scripts results in absolutely nothing.

local tpEvent = game.ReplicatedStorage.TeleportEvent
local players = game.Players
script.Parent.Touched:Connect(function(hit)
	local part2 = workspace['Tele2']
	local hum = hit.Parent:FindFirstChild("HumanoidRootPart")
	if hum then
		local player = players:GetPlayerFromCharacter(hit.Parent)
		tpEvent:FireClient(player) -- fires a RemoteEvent that triggers the fade in effect
		wait(1)
		hum.Position = part2.Position
		part2.TeleScript.Disabled = true -- disables the second teleport script to prevent looping
		script.Disabled = true -- same as above
		wait(2)
		script.Disabled = false
		part2.TeleScript.Disabled = false
	end
end)

The script above disables the listed scripts just fine, nothing else is disabled. Every script besides the script located in the doors work just fine as well, running when needed. This issue is baffling to me, as I've been fiddling with these scripts for hours, trying to figure out exactly what is wrong.

Let me know if you need the script for the doors as well.

2 comments

0

show us all the scripts that you disable and enable

0

The scripts I disable in the code are the exact same as the one posted here.