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

[SOLVED] Cloning Model for Only localPlayer to see?

Asked by 7 years ago
Edited 7 years ago

I have a button in a GUI, I need to make a script so that when the button is clicked, a model is 'previewed' on the localplayers screen only. I already have a grid placement system. I just need for when the button is clicked for the model to be cloned into the workspace.

3 answers

Log in to vote
1
Answered by 7 years ago
Edited 7 years ago

You should have FilteringEnabled turned on, in your game. With FilteringEnabled, you can freely change, add, or remove any object in the game from a local script without changes replicating to the server (for other players to see). In other words, just clone the object and parent it to workspace in a local script with FilteringEnabled on. This is always the best solution.


If you need further assistance in how FilteringEnabled works, or getting around FilteringEnabled-related "problems", check out a video I made discussing this. If you want a more graphic presentation, check out the wiki article for it.

0
Thanks! That works perfectly. shadow7692 69 — 7y
Ad
Log in to vote
-1
Answered by 7 years ago
  1. Turn FilteringEnabled on and clone the model via localscript.
  2. Clone it from a localscript and it parent it to the currentcamera.
Log in to vote
-2
Answered by 7 years ago
Edited 7 years ago

Well,i think i know how to do it. In a server script,clone a model and change all parts' transparency to 1

clone=model:Clone()
for i=1,#clone:GetChildren() do
    clone:GetChildren()[i].Transparency=1
end

and then,in a local script,change the LocalTransparencyModifier property of all parts in the model (except HumanoidRootPart) to 0

clone.LocalTransparencyModifier=0

and there it is.

0
... This was horribly, horribly, horribly done ... AstrealDev 728 — 7y
0
Oh sorry i didn't notice the edit button to fix the script. It's ok now arthurgps2 67 — 7y

Answer this question