Still have questions? Join our Discord server and get real time help.
Log in to vote

Parts Freeze While In Mid Air?

Asked by 7 days ago
Edited 7 days ago

I was testing the exploding parts for my brickbattle game but this happened while testing, they also unfreeze when i move close to them, anyone know how to fix this?, sorry for the lag.

Is there a script that automatically anchors parts? 2b2tpvp 17 — 7d
*A lag-remover script? 2b2tpvp 17 — 7d

1 answer

Log in to vote
Answered by 6 days ago

The problem is likely to do with NetworkOwnership. Roblox physics need an "Owner" of the part in order for the physics engine to work properly. Whoever 'owns' the part will be responsible for doing the physics calculations on their computer. Parts automatically change owners behind the scenes whenever the user gets close, and we can also set the ownership manually via the "SetNetworkOwner" method.

-- Insert this in the projectile script:
function onPartHit(part)
    --...lines of code
    part:SetNetworkOwner(player); --Set the owner to the person who shot the projectile
    part:SetNetworkOwnershipAuto(); --Give ownership back to the server 
    --There are better ways to set the ownership back, but I will leave that up to you.

For more information about NetworkOwnership, check out this article:


Answer this question