4581quzwi
(Senior_Builder)
August 16, 2020, 12:23pm
1
This script was intended to teleport players to their own brick
no errors displayed ~ it doesn’t work ~ it just teleports the player to 0,0,0,0
I’ve looked on deev hub and couldn’t find any solutions I even asked in discord for solutions
game.Players.PlayerAdded:Connect(function(plr)
wait(1)
local S = spawns.SpawnObject
plr.Character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(S.Position))
S.Name = plr.Name
plr.Character.Humanoid.Died:Connect(function()
plr.Character.HumanoidRootPart.CFrame = CFrame.new(Vector3.new(-3279.922, -4.125, 26.54))
end)
end)
Could Anynody Help?
CFrame is already a 3d position. So you don’t need Vector3 in there too.
You can make a part and make it face somewhere and tp the player to that parts’ cframe, Which makes the player face the parts forward face.
local spawns = game.Workspace.Spawn
game.Players.PlayerAdded:Connect(function(plr)
wait(1)
local S = spawns.SpawnObject
plr.Character.HumanoidRootPart.CFrame = S.CFrame
S.Name = plr.Name
plr.Character.Humanoid.Died:Connect(function()
plr.Character.HumanoidRootPart.CFrame = CFrame.new(-3279.922, -4.125, 26.54)
end)
end
Exeplex
(Exeplex)
August 16, 2020, 12:30pm
3
If plr.Character.HumanoidRootPart.CFrame = S.CFrame does not work, try SetPrimaryPartCFrame, for example:
plr.Character:SetPrimaryPartCFrame(S.CFrame)
If that doesn’t work, check the positioning of your SpawnObject and make sure that it’s correct. Also, confirm that nothing else could be interfering with the process.
1 Like
4581quzwi
(Senior_Builder)
August 16, 2020, 12:40pm
5
thanks for replying!
this is my code so far
it still didn’t work tho
as seen in this video
4581quzwi
(Senior_Builder)
August 16, 2020, 12:42pm
6
thanks for replying!
this is my code so far
it still didn’t work tho that’s pretty sad
I still understand your point
as seen in this video
4581quzwi
(Senior_Builder)
August 16, 2020, 12:44pm
7
the positioning is good and nothing is coliding
im just really confused lol
4581quzwi
(Senior_Builder)
August 16, 2020, 12:48pm
8
OMG im so sorry XD
i didn’t anchor the parts a very stupid mistake
im so so sorry lmao