Disabling server script with local script

Im trying to make a IK Character but the IK is delaying on the clients screen. I wanted to try and disable a server script that does IK stuff on the server via a local script that does the same to have no delay. But the server script is disabling but still running on the client. Also with both scripts enabled the character wierdly shake or something.

What Happens:

What i want to happen on the server and client but only happens on the client with the server script fully disabled before i ran the game:

Clients cannot access the server. If you want to disable a server script using a local script, you need to make a remote event, and make it so on the server, when that remote event is fired, it disables itself. The client can then fire that remote event to the server.

2 Likes

i still want everyone to see the IK legs if i disable the server script fully only the client will see it so i basically want to disable a server script on the client only

IIRC you can’t disable server scripts for a client only. Maybe try some work around so that the code on your server script can still be used on the client script?

1 Like

You can just make the server-sided legs invisible for the client, and then client-side legs invisible to the server.

that would cause 2 times much as lag IK is laggy it calculates alot

No, it wouldn’t. Two different scripts; a server and local script, operate the IK legs on their ends seperately. Yes, the work is being done twice, but it’s being done by two different machines.

It may also just be a better idea to make the client the only controller of their legs and let the client replicate to server.

1 Like