You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want a player to move to the model’s primary part position when triggering
proximity prompt -
What is the issue? Include screenshots / videos if possible!
it gave me an error that says
Workspace.Part.Script:13: attempt to index nil with 'PrimaryPart'
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I try to change primary parts to a part name but same thing happed
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
this is my code
script.Parent.ProximityPrompt.Triggered:Connect(function(player)
game.ReplicatedStorage.Remotes.DressUp:FireClient(player)
wait(1)
local cam = workspace.CurrentCamera
local char = player.Character
local container = game.Workspace.Minimapobjects:FindFirstChild("Changing Room")
char:SetPrimaryPartCFrame(container.PrimaryPart.CFrame ,container.PrimaryPart.CFrame.LookVector )
print("done")
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.