I'm trying to make a system that moves parts, the only problem is that I want to use it without buttongui's, tools, or mousedetectors. (i.e Miner's Haven)
My script (1'st line I don't know how to use the connection line, so I guessed :p)
local mouse = game.Players.LocalPlayer:GetMouse() -- I COULD USE HELP HERE ._. mouse.MouseClick:connect(function() position = mouse.hit.p game.Workspace.Part.Position = position end
I will accept your answer if it is successful!
First, MouseClick is wrong. You need to use Button1Down or Button1Up
local player = game.Players.LocalPlayer local mouse = player:GetMouse() mouse.Button1Down:connect(function() position = mouse.hit.p game.Workspace.Part.Position = position end)
This should work.