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

I Dont Understand How To use :MoveTo() or Click Position Can You Guys Help? [closed]

Asked by 6 years ago
Edited 6 years ago

This question already has an answer here:

How Do You Use :MoveTo() With Models?

I've tried doing

local Click = game.Players.LocalPlayer:GetMouse()) do game.Workspace.Part.Position = Click

0
Why Do My Question Always Get Closed By The Way? maxwilltopyu -13 — 6y
0
Well thats because you are duplicating the same questions. Questions are generally answered in 1-5 hours so you have to stay patience. Zafirua 1348 — 6y
0
Why did you just post another question asking the same thing? Also, that isn't valid Lua syntax. T0XN 276 — 6y

Marked as Duplicate by T0XN, Zafirua, Leamir, and theCJarmy7

This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.

Why was this question closed?

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

https://wiki.roblox.com/index.php?title=API:Class/Model/MoveTo

https://wiki.roblox.com/index.php?title=API:Class/Humanoid/MoveTo

MoveTo is used for model's PrimaryParts and Humanoid's that make them walk

Well the first thing is thats all been done wrong,

Mouse = game.Players.LocalPlayer:GetMouse() -- getting the mouse

Also to use the mouse's position use

Mouse.Hit.p --the position of the mouse

Next you want to use a Button1Down event

Mouse.Button1Down:connect(function()
    -- What you want to happen
end)

So in this case it would be

Mouse = game.Players.LocalPlayer:GetMouse()
Mouse.Button1Down:connect(function()
    game.Workspace.Part.Position = Mouse.Hit.p
end)
0
:connect() is deprecated, use :Connect(). Seriously, I think I've posted that a good 50 times on this website. T0XN 276 — 6y
Ad