Prop System like hl2/source

Well, If your only going to be in first person, you might as well use this basic script:

local ArrayOfPartsThatYouCanPickUP = {}
local mouse = game.Players.LocalPlayer:GetMouse()
local up = true
local s
mouse.Button1Down:Connect(function()
	if table.find(ArrayOfPartsThatYouCanPickUP, mouse.Target) then
		local q = mouse.Target
		if q.Anchored then
			s = false
		else
			s = true
		end
		q.Anchored = true
		local up = false
		repeat q.Position = workspace.CurrentCamera.CFrame.LookVector * 5 -- distance from camera 
			wait()
		until up
		if s then
			q.Anchored = false
		end
		end
end)
mouse.Button1Up:Connect(function()
	up = true
end)

Keep in mind, that script was entirely client sided, you probably want the part to move server sided, so just use a remote event/function (I also didn’t test it)

If your not going to be in first person, then you might want to follow this confusing trigonometry college math tutorial

2 Likes