Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

[SOLVED] Cloning Model for Only localPlayer to see?

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

✓ Accepted answer

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.

1 comment

0

Thanks! That works perfectly.

  1. Turn FilteringEnabled on and clone the model via localscript.
  2. Clone it from a localscript and it parent it to the currentcamera.

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.

2 comments

0

... This was horribly, horribly, horribly done ...

0

Oh sorry i didn't notice the edit button to fix the script. It's ok now

This discussion is preserved as it was. New answers, comments, and votes are closed.