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

How would I remove the small delay upon the player moving?

Asked by 4 years ago
Edited 4 years ago

So, I have been trying to figure this out for awhile now and I just cannot figure out if it is possible or if I am just trying to something that is not possible.

The thing I am working on is a stand from the popular anime JoJo's Bizarre Adventure.

My question is about BodyPosition, this part of my script makes the stand stay behind the player even when they walk around/move my problem here is that after they move it takes about 0.5 seconds for the stand to follow them from behind, I have tried countless ways to try to make this work and none of my methods work, I know it is not my internet connection because I have 100 down and 25 up, I have checked many times throughout my scripts for code that is messing with my current code here but I have found none. Can I get some help on debugging my current problem?

Copy this link and paste it to see. https://gyazo.com/0afc4a42e416377919834f21498560ce

This is how it is currently setup.

while true do
    local p = followpart.CFrame * Vector3.new(2,2.5,1.5)
    stand.BodyPosition.Position = Vector3.new(p.x,p.y,p.z)
    stand.BodyGyro.CFrame = followpart.CFrame
    game:GetService("RunService").Heartbeat:wait()
end

I don't want it to instantly move with the player but the delay it has is too much.

0
Is this a server script or a localscript? poke7667 142 — 4y
0
serverscript ColeRandom -6 — 4y
0
localscript works, Thanks! ColeRandom -6 — 4y

Answer this question