Hello,
So I got CFrame teleporting and it doesn't work Online. The code is made in "Script". Works in Studio, but not in Online
local Player = game.Players.LocalPlayer
Player.Character.Torso.CFrame = CFrame.new(Vector3.new(-142.6, 49.5, 46))
Hello,
So I got CFrame teleporting and it doesn't work Online. The code is made in "Script". Works in Studio, but not in Online
local Player = game.Players.LocalPlayer
Player.Character.Torso.CFrame = CFrame.new(Vector3.new(-142.6, 49.5, 46))
I wouldn't use CFrame if I were you. I'd use MoveTo:
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
char:MoveTo(Vector3.new(-142.6, 49.5, 46))
end
end)
The script loads before the character/torso exist, so you need to wait for them to load.
local Player=game.Players.LocalPlayer
local Character=Player.Character or Player.CharacterAdded:wait()
Character:WaitForChild("Torso").CFrame=CFrame.new(-142.6,49.5,46)
This discussion is preserved as it was. New answers, comments, and votes are closed.
5 comments
Hey, Sadly it doesn't work Online or in Studio. Doesn't show any errors as well
Btw, that code comes after "Hint Talk" code
The spawn system may be overriding line 3 if you have any SpawnLocations.
I got 6 Spawn locations. How can I make them to get to SpawnLocations maybe? Without killing them
I don't understand what you just said.