script.Parent.MouseButton1Click:connect(function()
game.Workspace.model:SetPrimaryPartCFrame(game.Workspace.model.PrimaryPart.CFrame)
end)
i dont know if this is right but this isnt working. i would appreciate any help from you guys thank you.
script.Parent.MouseButton1Click:connect(function()
game.Workspace.model:SetPrimaryPartCFrame(game.Workspace.model.PrimaryPart.CFrame)
end)
i dont know if this is right but this isnt working. i would appreciate any help from you guys thank you.
One of the reasons why is you probably didn't set the PrimaryPart for the model. In order to do this, please follow these instructions:
script.Parent.MouseButton1Click:connect(function()
local model = game.Workspace.model
model.PrimaryPart = 'NAME OF PART'
model:SetPrimaryPartCFrame(model.PrimaryPart.CFrame)
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
Have you set a PrimaryPart for the model?
i found my mistake now thank you for your help.