GIF of moving: Moving
Pic Of Object: Object
Script:
local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() local TweenService = game:GetService("TweenService") local Info = TweenInfo.new(0.5) local Rs = game:GetService("RunService") local Hb = Rs.Heartbeat function getBaseFromPlayer(Player) for i,v in pairs(workspace.Bases:GetChildren()) do local Info = v.Info local Owner = Info.Owner if Owner.Value == Player then return v end end end function MoveObj(Position, Obj) Obj:SetPrimaryPartCFrame(CFrame.new(Position.X, 1, Position.Z)) end function StartPlacing(Obj) local ObjClone = Obj:Clone() ObjClone.Parent = workspace.CurrentCamera for i,v in pairs(ObjClone:GetChildren()) do if v:IsA("BasePart") and v.Name ~= "Hitbox" then v.Transparency = 0.5 v.CanCollide = false end end return ObjClone end local Obj = game:GetService("ReplicatedStorage"):WaitForChild("Items").TestModel local PlacingItem = StartPlacing(Obj) Hb:Connect(function() MoveObj(Mouse.hit.p, PlacingItem) end)
The problem is probably that the mouse doesn't ignore the object you're trying to place. Just add this little snippet of code to your script.
Mouse.TargetFilter = ObjClone