Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why is this SetPrimaryPartCFrame not working? [CLOSED]

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.

2 comments

0

Have you set a PrimaryPart for the model?

0

i found my mistake now thank you for your help.

2 answers

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:

  1. Open up Explorer
  2. Find the model, go to properties.
  3. Click primary part and change it to a part.
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.