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

How can i move a model by right clicking on mouse.Hit.p to move to there?

Asked by
Maaruv -3
6 years ago

I know it can be done but not sure how to script it because im fairly new at scripting

Model:MoveTo(mouse.Hit.p)
wait()

that's my attempt. help pls

0
What went wrong, did you even try it, btw, use remote events, mouse doesn't exist for the server User#20388 0 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago
model = game.Workspace.Model
function onClick(Mouse)
    location = Mouse.Hit
    location.CFrame = model.Position.CFrame
end
script.Parent.Selected:Connect(onClick)
0
thanks! I don't know this either. ILikeTofuuJoe 1 — 6y
0
lol DeceptiveCaster 3761 — 6y
0
Maaruv not a valid member of workspace? Maaruv -3 — 6y
0
what do u mean? as in server script? Maaruv -3 — 6y
View all comments (7 more)
0
u cant get a mouse in a server script...? Maaruv -3 — 6y
0
look at that one DeceptiveCaster 3761 — 6y
0
that one uses a HopperBin though, i'm not sure if you're looking for that DeceptiveCaster 3761 — 6y
0
how do u insert a hopperbin object? i cant find it anywhere Maaruv -3 — 6y
0
right click >> Insert >> HopperBin DeceptiveCaster 3761 — 6y
0
i tried that in the starterpack, cant find it. even in advanced objects there isnt a hopperbin. only tools Maaruv -3 — 6y
0
^ that's because they're deprecated brokenVectors 525 — 6y
Ad

Answer this question