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

How to make changes only on a client?

Asked by 10 years ago

If you play base wars you should know what I mean. How would I create a part or change a property that is only visible to a certain client? Base wars has things like "part" explosions you can turn on and off, and for a while they had FPS arms you could turn on and off, and you have night vision which changes the clients lighting to a dark green.

1 answer

Log in to vote
0
Answered by
adark 5487 Badge of Merit Moderation Voter Community Moderator
10 years ago

There are two methods, and the first is a lot easier.

1) Filtering

When Workspace.FilteringEnabled is true, you can use LocalScripts to control client-side visual effects without having anything show up on the Server. This also applies to changes to Lighting. No changes are replicated, as far as I know.

2) PlayerGui/Camera parenting.

Whether or not Filtering is enabled, children of the Player's PlayerGui or Workspace.CurrentCamera are not replicated to the Server. This only applies to bricks, however. To get client-specific Lighting changes to work, you'll have to employ a clever hack involving latency, which you can examine here!.

You will have to use LocalScripts for all of this, obviously.

0
As a side question, Adark, do you know of a way to have a Part invisible to the client, but visible to the server? In the same way that children of Character, when in first person, (and unless they are Tool instances) are not visible to the client. duckwit 1404 — 10y
0
Thanks! I'm gonna have to do some scripting lessons with you! lightpower26 399 — 10y
0
@duckwit; You can use Filtering to set the properites of a Server-object locally, or just create Local parts on every client EXCEPT the one you want them to not be visible on. @Altlight; I'm actually writing a tutorial series right now, lol. https://bitbucket.org/FuriousProgrammer/rbx.lua-tutorial-for-newbs/src adark 5487 — 10y
Ad

Answer this question