Hey, lately I've been developing a script that lets me place a model whereever I click. for example:

stora = game.ServerStorage
model = stora.Model
mouse = game.Players.LocalPlayer:GetMouse()

mouse.Button1Down:connect(function()
clon = model:Clone()
clon.Parent = workspace
clon:MoveTo(Vector3.new(mouse.Hit.p)) -- this doesnt work it it just makes the position 0,0,0.

end)

Leave any questions down below.

Much appreciated.

4 comments

0

if this is a local script it cant access server storage and if its a server script it cant access the local player so use local and use replicatedstorage instead (it works different in studio than server)

0

Abnotaddable, It still does the same error. It clones the model but doesn't set its position right.

0

Try setting its position instead, like clon.PrimaryPart.Position = m.Hit.p

0

I have it just ended up teleporting the rest of the parts instead of the primary part, which is weird...