I've tried doing
local Click = game.Players.LocalPlayer:GetMouse()) do game.Workspace.Part.Position = Click
I've tried doing
local Click = game.Players.LocalPlayer:GetMouse()) do game.Workspace.Part.Position = Click
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)
:connect() is deprecated, use :Connect(). Seriously, I think I've posted that a good 50 times on this website.
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
Why Do My Question Always Get Closed By The Way?
Well thats because you are duplicating the same questions. Questions are generally answered in 1-5 hours so you have to stay patience.
Why did you just post another question asking the same thing? Also, that isn't valid Lua syntax.