Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why does this CFrame not work?

I don't understand why this doesn't work:

-- Note that when I use a normal (3, 444, 33) argument it works.
game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new((Vector3.new(game.Workspace.Spawns.Spawn1.CFrame)))

1 comment

0

I don't feel this warrants another answer, but you've basically stacked too many constructors. If you want to set the Torso's CFrame to Spawn1's CFrame, just do it directly, don't user a Vector3 constructor inside of a CFrame constructor.

2 answers

✓ Accepted answer
-- Note that when I use a normal (3, 444, 33) argument it works.
game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(game.Workspace.Spawns.Spawn1.Position)

Because the script wants a Vector3 instead of the CFrame value of the of the item to teleport to, Spawn1's Position is already in Vector3, so why not use that.

Try this:

game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(Vector3.new(game.Workspace.Spawns.Spawn1.Position))

I think it has to beSpawn1.Position.

This discussion is preserved as it was. New answers, comments, and votes are closed.