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

Teleporting the player Y+5?

Asked by
RoyMer 301 Moderation Voter
8 years ago

Why isn't his line working as I added the '.Y+5'?

player.Character.Torso.CFrame = CFrame.new(game.Workspace:FindFirstChild("Position"..(player.PlayerGui.Position.Value+1)).Position.Y+5)
0
You need 3 numbers? As far as I can see, you only have 2? ConnorVIII 448 — 8y
0
player.Character.Torso.CFrame = CFrame.new(game.Workspace:FindFirstChild("Position"..(player.PlayerGui.Position.Value+1)).Position.X,Position.Y+5,Position.Z) Still won't work :/ RoyMer 301 — 8y

1 answer

Log in to vote
1
Answered by 8 years ago

You can't bruteforce an individual property like that. You have to manipulate this with a Vector3 or CFrame.

player.Character.Torso.CFrame = CFrame.new(workspace:FindFirstChild("Position"..(player.PlayerGui.Position.Value+1)).Position + Vector3.new(0,5,0))
0
Thanks! RoyMer 301 — 8y
Ad

Answer this question