How can I allow a player to drag certain models like in the style of Lumber Tycoon 2?
Some suggested this code but It doesn't give errors, and doesn't seem to work.
local model = workspace.TestModel local RunService = game:GetService("RunService") local UIS = game:GetService("UserInputService") local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() UIS.InputBegan:connect(function(input, gpe) if not gpe and input.UserInputType == Enum.UserInputType.MouseButton1 then model:SetPrimaryPartCframe(CFrame.new(Mouse.hit.x, Mouse.hit.y, Mouse.hit.z)) end end)
When you post next time, hit the lua logo, so its easier for us to read, check if it has a primary part?