Tycoon physics issues

Hey everyone! Thanks for stopping by! On an ongoing project that has been getting a lot of attention from my group members, and constantly having lots of bugs to fix, I found an issue I just can’t quite figure out how to fix. Basically, when the player walks onto the conveyor (20 velocity) as it’s pushing parts along just fine, the conveyor will slow down a TON and basically make the whole world’s physics go into slow motion. (I’m not talking about the player blocking the objects from the converter at the end of the conveyor, by the way. The moment the player touches the conveyor this will happen out of the blue.) I looked all over, and couldn’t find any culprits, so I decided to make this post and see if you guys could help me with my issue. Thanks! :smiley:

I might assume this is due to network ownership, possibly.

Have you tried setting the network owner of each block the droppers create on the conveyor to the owner of the tycoon?

tycoon_drop:SetNetworkOwner(tycoonOwner)
2 Likes

Am I able to apply the network owner through a touched event, and do other clients see the objects too? This is probably my solution, but it would probably be a good idea to clarify first. Thanks for your help, by the way!

1 Like

Ideally, you should set the network owner of the created conveyor objects when they’re first made.

And yes, physics will replicate to other clients. By setting the network owner of these parts, you’re basically giving that client permission to calculate those physics entirely on their client, which will greatly increase the smoothness of forces and such.

https://developer.roblox.com/en-us/articles/Network-Ownership

1 Like

iirc you can only use :SetNetworkOwner on baseparts.
So you can use it like this:

local part = Instance.ne... -- just part of the example.
-- it works if you clone it as well.
part.Parent = workspace

if part:IsA("BasePart") and part:CanSetNetworkOwnership() then
    part:SetNetworkOwner(player) -- player must be a player object.
    -- it can't be the name of the player.
end

Of course, if you already know it’s a basepart, then you can remove the part:IsA("BasePart") portion.

Thank you! This fix is probably going to take me a while, considering the amount of scripts in the droppers, but it shouldn’t be an issue.

1 Like