I am trying to teleport the player, but every time I run the script, it teleports the player to 0,0,0 (using a classic style character):
Character.Torso.CFrame = CFrame.new(-7000, 3467, -2380.982 + (g * -10));
Character:SetPrimaryPartCFrame(CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0)));
(g = 1, and character has already been defined)
@Universal Link, I tried your method (adding more arguments), and this is what I got:
Character.Torso.CFrame = CFrame.new(Character.Torso.Position, Vector3.new(-10000, 30467, -2380.982 + (g * -10)));
Character:SetPrimaryPartCFrame(CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0)));
However, the character is still teleported to 0,0,0. I tried removing the second line of code by commenting it out:
Character.Torso.CFrame = CFrame.new(Character.Torso.Position, Vector3.new(-10000, 30467, -2380.982 + (g * -10)));
--Character:SetPrimaryPartCFrame(CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0)));
But then the character doesn't get teleported anywhere. Also, what do you mean by referencing the CFrame with serviceprovider?
CFrame.Angles()returns a rotatedCFramebut with a position of(0, 0, 0). You can change this position by multiplying it by another CFrame. For example,cframe = CFrame.new(32, 45, 81) * CFrame.Angles(0, 0, math.rad(90))will makecframehave a position of(32, 45, 81)and a rotation of(0, 0, math.rad(90)). Try changing the second line to this:Character:SetPrimaryPartCFrame(Character.Torso.CFrame * CFrame.Angles(math.rad(0), math.rad(-90), math.rad(0)));. Does this work? - NetherGranite