Script does not work when trying to duplicate a model and place it next to you

game.StarterGui.Button.MouseButton1Click:Connect(function()
local model = game.ServerStorage.StarterMech
local plr = game.Players

local modelClone = model:Clone()
modelClone:PivotTo(plr.Character.PrimaryPart.CFrame * CFrame.new(5, 0, 0))
modelClone.Parent = workspace

end)

To offset a cframe, you must add a vector3 to it.
See here: CFrames | Roblox Creator Documentation

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.