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

BodyVelocity and Welds prone to Break(lag), Help?

Asked by 10 years ago

So.. I am using a HopperBin with a LocalScript inside, a few events to trigger a MouseClick.

Now that I have explained that, I'll go further to my question. Let's say when the player clicks the HopperBin a part appears infront of him and after a while travels to where the player is looking at, using BodyVelocity. Considering the HopperBin is on the Backpack, local Player = script.Parent.Parent.Parent

local x = Instance.new("Part", workspace)
x.CFrame = Player.Character.Torso.CFrame *CFrame.new(0, 0, -5)
wait(1)
local y = Instance.new("BodyVelocity", x)
y.maxForce = Vector3.new(math.huge, math.huge, math.huge)
y.velocity = Player.Character.Torso.CFrame.lookVector *40

It usually works. But; for almost a month now, the parts would(sometimes) just appear and float infront of the user(like anchored) a problem I have experienced while testing in Studio Play mode, but never gave more thought, as it would never happen online. Lag probably? I don't know why.

Also, It seems to have the same problem with the Welds as well. Even if they are working sometimes, others they will just anchore the player or Temporarily teleport him to Vector3.new(0, 0, 0) which has nothing to do with the Part1. I have tried using Motor6Ds just incase, but nothing came out.

Any help guys?

1 answer

Log in to vote
0
Answered by
Tesouro 407 Moderation Voter
10 years ago

Did you try using small values instead of math.huge? maybe it kinda bugged the BodyMover.

The welds, are their properties correct?

(since this is not exactly a scripting question, I don't have a better answer..)

Ad

Answer this question