Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Not completely sure about client-side/server-side?

Asked by
funyun 958 Moderation Voter
8 years ago

If you have a tool which can create parts, should you use a remote to create the parts on the server? If those parts are projectiles that can do damage, should you make a remote to damage people on the server? I don't get it, I've only made tools and hopperbins like these running purely on local scripts, and they work.

1 answer

Log in to vote
2
Answered by
BlackJPI 2658 Snack Break Moderation Voter Community Moderator
8 years ago

Short Answer:

Doesn't matter unless FilteringEnabled is true. If it is true then you'll need to run it on the server.

Why?

The property FilteringEnabled toggles the ability for changes to be replicated from client to server. If a local script creates a part while FilteringEnabled is true, then the object will not replicate to the server but will exist for the client. This allows you to easily make local parts instead of using the old 'hacky' methods. If you try to use a local script to change the color of that part while FilteringEnabled is true, again the change is not replicated to the server but is made on the client.

This is where RemoteEvents and RemoteFunctions come in handy. You can utilize the benefits of FilteringEnabled and still have cross-scope communication using these object's events.

Ad

Answer this question