Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Why does this CFrame not work? [closed]

Asked by
NecoBoss 194
9 years ago

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)))
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. adark 5487 — 9y

Locked by adark and TheMyrco

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

2 answers

Log in to vote
2
Answered by
M39a9am3R 3210 Moderation Voter Community Moderator
9 years ago
-- 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.

Ad
Log in to vote
-1
Answered by
SanityMan 239 Moderation Voter
9 years ago

Try this:

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

I think it has to beSpawn1.Position.