Anchored parts velocity not moving parts on top of it

development

#1

Hello, I am not entirely sure when this started but now whenever i anchor a part and set the velocity of it, anything on top of it doesn’t move as it did previously, i am just wondering why this is. sorry if this is the wrong topic, i wasn’t sure where to ask this


#2

Seems to work fine for me? (see here)


#3

does it work in player too? i noticed that when using the future is bright studio, that this actually did work, but when using the latest version it does not (and it didnt work in player at all)


#4

Nevermind! now it just all the sudden started working, with no changes to any scripts or anything at all


#5

That’s Roblox physics for you… :wink:


#6

Occassionaly the velocity property resets to 0,0,0 (or does something else weird) so I find that it’s best to use a script like below:

Object:GetPropertyChangedSignal('Velocity'):Connect(function()
-- Change velocity to what you want here
end)

Object.Velocity = Vector3.new(0, 0, 0) -- Change to your default velocity property

(typed on web, indentation and all that will be bad)
to ensure that the velocity will stay constant and never be affected by Roblox Physics or something else.

You could make a Vector3 value if you are changing the value of the velocity all the time.

Best of luck!


#7

GetPropertyChangedSignal will not fire when properties are set by the physics subsystem, such as when physics influences the Velocity/Position/CFrame/RotVelocity/etc. It will only trigger when you manually set the property via scripts.

So what you’re doing here is just preventing scripts from overriding velocity. Does not seem related to the problem described in the first post here at all, it accomplishes nothing that setting the Velocity via the property window doesn’t, assuming no other scripts override the Velocity.


#8

I found that in some games about 50% of the time the velcoity property when set from Studio would work, and 50% of the time wouldn’t work. Not sure what that is related to.


#9

Either way, when setting Velocity by script only once, a single assignment statement should do enough. No need to connect to GetPropertyChangedSignal if nothing else changes the velocity, it will not do anything. In your example, the velocity set call on the last line will trigger the signal, and then you set Velocity inside of there which probably re-triggers the signal, (and then not again, because you set it to a static value presumably, so it’s not changing again), and then never triggers again after that.