I am trying to change the properties of a part locally in order to reduce lag. This is a local script in StarterPlayerScripts, it doesn’t work and I don’t know why literally nothing happens. I get no errors just nothing happens.
local part = game.Workspace.SpinningPart.Union
part.HingeConstraint.AngularVelocity = 2
part.HingeConstraint.MotorMaxTorque = 10000
The part are controlled by the server,Not the client,You could change the value but the one simulating is the server, So make networkownershipt of the part to be the player, But… Non 9 year old scripting hacker could easily hack it to for example, For it both the part, and stuff to get fling or what ever
so how can I make a spinning part that players can stand on with no lag, because right now it spins and players can stand on it but theres a ton of lag.
OOOO You mean replication lag, Set the networkownership of the part to nil,If it still lag, Thats caused by all the collision,Theres no fix for the latter one (as far as i know)
Replication lag is When a part is close to the player,The player own it, It is commonly seen in Zombie chasing game, But, Most of them is fixed already by setting the networkownership to nil, For collision, collision require calculation and that take memory, And a lot of contact over short period of time may lag idk
I just tried setting the network owner to nil and there is still lag. I think the lag is caused by physics because the server has to perform physics for each client which is why i was trynna make it locally so there is no over performing of tasks.
That wouldn’t work either. You’d need to create the part on the client, so it doesn’t exist on the server.
The issue with that is that the parts properties wouldn’t be synced with the other clients, creating a value on the server and using that on the clients could work (using remote events)
Honestly it is fine if the parts aren’t synced with other players because it is an obby and other players don’t really affect each other. How can I create a part on the client because I tried doing Instance.new in a local script in starter player scripts and nothing happened
Just clone the part/model from ReplicatedStorage and put it into workspace. I don’t have much time, so I will reply tomorrow if you need additional info. Hope this helps though
(too busy with the game jam submission )