So I recently posted here, got a lot of help and some tips to make my script function with FE. Yet it still does not work. It is now a Script in the Workspace. No output errors either here it is:
local Teles = workspace.Teams
game.Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
Character.Humanoid.Died:connect(function(c)
print("worked")
if Player.Team == "Imperials" then
Character.Torso.CFrame = CFrame.new(Teles.ImpTel.Position)
elseif Player.Team == "Rebels" then
Character.Torso.CFrame = CFrame.new(Teles.RebTele.Position)
end
print("done")
end)
end)
end)
So basically what happens in as soon as the player resets(which is fine, exactly when I need it to fire) it instantly prints both of those print statements at lines 6 and 12. Seems to skip over the if's. The prints happen as soon(practically instantly) as the player dies so I dont think it can really teleport the player if the script ends before the player has even respawned. I have no guess as to how I am supposed to fix this any help? Anything is appreciated!

1 comment
Add a wait. Code always runs as fast as it can.