#Character.PrimaryPart.CFrame = Part.CFrame behaving oddly?

1 messages · Page 1 of 1 (latest)

patent zealot
#

What happens if you change character.PrimaryPart.CFrame = startBlock.CFrame to character.PrimaryPart.CFrame = startBlock.CFrame + (character.PrimaryPart.Position - character.Torso.Position)?

#

im not sure whats wrong but only thing i can think off is somehow the primary part is offset from your character when you teleport it

fleet urchin
patent zealot
#

yeah they did stop the animation before teleporting so idk whats wrong

#

what if you do like task.wait(1) then teleport does it still clearly teleport to the wrong location?

fleet urchin
#

also is outblock and startblock different or something?

#

if you can please do explain the difference between those 2

patent zealot
#

outblock is the red block in the barrel and startblock is the gray

true minnowBOT
#

studio** You are now Level 9! **studio

austere geode
patent zealot
#

whats the gray block for

#

oh ok

austere geode
#

sorry i said the wrong color lmao

patent zealot
#

what happens if you do like task.wait(1) after jumpOut:Stop()

#

im just curious if it does the same thing if you wait even longer

austere geode
austere geode
#

maybe i need to edit my animation to where they are already positon at the gray block, but shown to be jumping out, so the 'landing' is smoother?

#

because as the animation plays they are still inside the barrel

patent zealot
#

try this

jumpOut.Ended:Once(function()
  character.PrimaryPart.CFrame = startBlock.CFrame
  controls:Enable()
  camera.CameraType = Enum.CameraType.Custom
end)
jumpOut:Play()
task.wait(3)
jumpOut:Stop()
#

i think you just have to wait for the animation to fully end so there aren't any offsets from the primary part

austere geode
patent zealot
#

Nice yeah it looks a bit better now, im not sure why it would still be a little glitchy at the end

#

you could probably try lowering the task.wait to like 2.5 seconds and see

austere geode
patent zealot
#

and yeah flipping the startbox around too

austere geode
patent zealot
#

Oh, yeah it looks like its probably interpolating back to the idle animation so you can see everything move back to its normal position

#

maybe you could fix with making a RunService connection to temporarily force the player to be at the startbox, or you could try messing around with the animation so the humanoid root part moves too

austere geode
#

i think ill mess with the animation, i have idea that might help, thank you for helping me out :D

patent zealot
#

no problem, and you're welcome

#

gl

austere geode