of     1   

Fsxfighter265
#215828873Wednesday, May 03, 2017 2:33 AM GMT

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
PhantomVisual
#215837784Wednesday, May 03, 2017 5:39 AM GMT

The events only runs once when the mouse clicks. Use RunService or something that updates fast to make it follow your cursor.
JSONDxcode
#215838292Wednesday, May 03, 2017 5:57 AM GMT

playerMouse = game.Players.LocalPlayer:GetMouse() Model = nil dragging=false 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 Model = Road playerMouse.TargetFilter=Model end playerMouse.Move:connect(function() if dragging==true and Model~=nil then Road:MoveTo(playerMouse.Hit) end end) playerMouse.Button1Up:connect(function() dragging=false Model=nil playerMouse.TargetFilter=nil end)

    of     1