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

How do i make a model appear for each client and didnt replicate any change to others client?

Asked by 5 years ago
Edited 5 years ago

First of all sorry if my english bad..btw i'm here not to requesting script but i just want to ask pro some tips.

My question is how do i make a model appear for 1 client only?. So if client 1 change something inside the model for example brickcolor,it wont replicate to another client or server stay as original. Do i need to parent the model inside camera or something else?

Help me please

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

FilteringEnabled and Local Parts

has come with some exciting features. One of which is the ability to make LocalParts much easier than with the old method. Here's are examples of how to make a local parts/models:


Making the part:

This is inside of a Local Script

local part = Instance.new("Part", workspace)
part.CFrame = CFrame.new() --Teleport to position 0, 0, 0

Modifying an existing part:

local part = workspace.Part
part.BrickColor = BrickColor.Random() --Random color

Local Model:

local model = game:GetService("ReplicatedStorage").Model
model.Parent = workspace

Old Method

You mentioned the old method of making LocalParts, where you put the part into the camera because only the client can see the camera.

--Local Script
local part = Instance.new("Part", workspace.Camera)
part.CFrame = CFrame.new() --Teleport to position 0, 0, 0

This is the old way to do it. You don't have to do this anymore.


Summary

Any changes that a LocalScript does will only be visible to the client. Everything else will be invisible to the server and other clients. If you change a part color, only the client sees the new color. If you change the position, only the client sees the new position. Etc.



Hope it helps!

0
that's what i want to know..thank you so much astrosyedst 7 — 5y
0
No problemo :) EzraNehemiah_TF2 3552 — 5y
0
what about changing player movement on the client? because i tested it and i used a local script for player movement and other clients saw it ScrubSadmir 200 — 5y
0
@ScrubSadmir Thats because the client is in charge of player's movement. This is also the reason why most tools use local scripts and still function. Local scripts only work if inside the player (or character) and is making changes to the character or ui for example EzraNehemiah_TF2 3552 — 5y
Ad

Answer this question