Baseness
|
  |
| Joined: 07 Oct 2015 |
| Total Posts: 1001 |
|
|
| 09 Mar 2016 02:21 PM |
I have this simple script:
game:GetService("RunService").RenderStepped:connect(function() if game.Workspace.Player and game.Workspace.Player.Torso then game.Workspace.Player.Torso.CFrame = CFrame.new(0, 10, 0) end end)
This works except that it glitches and the camera looks like it's falling and the Torso is alternating position several studs down and back up.
How can I CFrame the Torso constantly without making it glitch like that?
|
|
|
| Report Abuse |
|
|
| |
|
Baseness
|
  |
| Joined: 07 Oct 2015 |
| Total Posts: 1001 |
|
|
| 09 Mar 2016 02:53 PM |
But I want to know why it is glitching.
I thought someone might know.
|
|
|
| Report Abuse |
|
|
TexasOreo
|
  |
| Joined: 08 Apr 2014 |
| Total Posts: 25 |
|
|
| 09 Mar 2016 03:21 PM |
| It "glitches" because the character is constantly being dragged downward, you have to stop the movement by anchoring like @king mentioned. |
|
|
| Report Abuse |
|
|
Baseness
|
  |
| Joined: 07 Oct 2015 |
| Total Posts: 1001 |
|
|
| 09 Mar 2016 03:30 PM |
That explanation doesn't explain why the same doesn't happen to unanchored parts.
They don't glitch unlike the Torso.
|
|
|
| Report Abuse |
|
|
sycips
|
  |
| Joined: 21 Mar 2011 |
| Total Posts: 1368 |
|
|
| 09 Mar 2016 03:37 PM |
@OP I do not know the answer, since Ié never seen what you just described. According to me, it should just change the position and nothing else special should happen... BUT! Maybe instead of finding that bug, we can come up with a solution for your problem? Do you want to teleport the player? If so, here are some quick solutions:
--Change the HumanoidRootPart instead:
player.Character.HumanoidRootPart.CFrame = CFrame.new(0,10,0)
--Use the MoveTo method. If you use this method to teleport a player into a part, then it will teleport the player on top of that part.
player.Character:MoveTo(Vector3.new(0,10,0))
I hope this helps a bit with your problem :D
~sycips~ |
|
|
| Report Abuse |
|
|
Asinny
|
  |
| Joined: 04 Oct 2014 |
| Total Posts: 2757 |
|
|
| 09 Mar 2016 03:40 PM |
"That explanation doesn't explain why the same doesn't happen to unanchored parts."
the same thing DOES happen to unanchored parts literally every part in the character is unanchored
|
|
|
| Report Abuse |
|
|
Baseness
|
  |
| Joined: 07 Oct 2015 |
| Total Posts: 1001 |
|
|
| 09 Mar 2016 03:40 PM |
the character actually does not move up and down, it's the camera that glitches which makes it look like the character is glitching
i've found the problem, thank you
|
|
|
| Report Abuse |
|
|