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

how do you get a model to go were you have clicked?

i asked this question already and i got a good answer but i dont think i understood all of it but yeah i really need this for the game i am making please help

2 comments

0

:MoveTo() :SetPrimaryPartCFrame() :TranslateBy() all move models

0

I edited my answer, apparently. I had 'local' capped up. Lua's case sensitivity can be annoying at some periods.

1 answer

✓ Accepted answer

Well first :GetMouse() is a necessity for accessibility of the mouse, and the model. There are certain, specific properties for Vector3, and CFrame, for an easier replacement, Vector3 will be used.

Notice, :GetMouse() must be accessed by a localscript. Firstly, accessed by LocalPlayer.

local mouse = game.Players.LocalPlayer:GetMouse()
local Model -- model title.

mouse.Button1Down:connect(function()
	Model:MoveTo(Mouse.Hit.p)
end)

1 comment

0

hey thank you for answering but the Mouse next to local in line 1 is underlined red

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