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

why does the Server miss velocity changes?

Asked by 6 years ago

In an attempt to understand how servers use velocity, I set up a simple scene where a Part hasa server script inside of it that makes the block change color and hop up every three seconds. However, the block manages to stay still while changing color the vast majority of the time.

Here's the code used

while (true) do
    script.Parent.Velocity = Vector3.new(0,50,0)
    script.Parent.BrickColor = BrickColor.Random()
    wait(3)
end

Is there something about the Roblox engine I need to be aware of, or did I approach the implementation wrong, or is there an error I'm missing?

Thanks

0
I'm having the same problem, are you perhaps using Filtering Enabled? Acryius 22 — 6y
0
I am -- after reading your comment i flipped it off, but it had no effect :( meistermayo 32 — 6y
0
Alright i'm looking for a fix right now if i find it i'll let you know Acryius 22 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago

When the Part is not being used by the Physics Engine, it becomes a Sleeping Part.

By walking up against it, or standing on top of it, the server manages to call the velocity change every time.

By turning off Sleeping in the Physics section of Settings, this effect can be disabled. However, this could have performance consequences, so another solution would be desirable.

Ad

Answer this question