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

How to set model position to the cursor?

Asked by 7 years ago
Edited 7 years ago

I'm working on a game that lets you to click on a gui and a model appears on your cursor. The model will follow your cursor until clicked somewhere on the baseplate? I thought this script would work:

playerMouse = game.Players.LocalPlayer:GetMouse() script.Parent.MouseButton1Down:connect(function(mouse) script.Parent.Visible = false script.Parent.Parent.RoadsColum.Visible = true Road = game.ServerStorage.Road:Clone() Road.Parent = game.Workspace Road:MoveTo(mouse.Hit) end

0
Could you please put your code in a code block? It'll help us to read it better & understand it. :) (When you go into edit, there's a icon w/ the lua symbol: click that to open the code block, and make sure to have your code inside of it.) TheeDeathCaster 2368 — 7y

Answer this question