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

Model not moving where ever I click?

Asked by 7 years ago

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.

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) abnotaddable 920 — 7y
0
Abnotaddable, It still does the same error. It clones the model but doesn't set its position right. T0tallyN0tATr0ll -2 — 7y
0
Try setting its position instead, like clon.PrimaryPart.Position = m.Hit.p Nikkulaos 229 — 7y
0
I have it just ended up teleporting the rest of the parts instead of the primary part, which is weird... T0tallyN0tATr0ll -2 — 7y

Answer this question