Using the following code, I wanted to move a Model I placed in ReplicatedStorage to mouse.Hit.Position when I click.
However, it doesn’t move the model and only places it into workspace
This is the layout in the Tool:
I have tried :MoveTo(), :PivotTo() :SetPrimaryPartCFrame().
I have also moved the original model into ServerStorage and that didn’t change anything either
Am I just formatting it wrong or is this not possible with models?
Does the model have a primary part? That’s all I see that could be the issue at first glance.
edit:
actually I see the script also destroys its own parent before doing the last line, which I think would also stop the script early.
so far in the new server-script, I have never seen model:MoveTo(). if you’re trying to set the position of a model, you should be using :PivotTo(). However, you need to get the CFrame for using this, but mouse.Hit is already a CFrame, so the line would look something like this
PrimaryPart should work for any BasePart (a physical object, like a union or part for “instance” haha). could you send me the new code? I tested it in studio and it worked flawlessly.
WAIT, I just noticed that in the LocalScript, you shouldn’t put “plr” as the first argument. you do not need it because it’s already passed onto the next script automatically.