Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Trouble setting primary part?

Asked by 3 years ago

I am messing around in Roblox studio trying to make an animated character that you can play as I have done that I have put in the animations but I am having some trouble with the Primary part. I went onto google searched it up did what it said and set the primary part in a script like so.

game.Workspace.PrimaryPart = game.Workspace.Monster.HumanoidRootPart

By the way, I did this in a separate server script service script I am not sure if I was meant to do it like that.

But still when I join I get an error saying

"10:17:40.468 - Model:GetPrimaryCFrame() failed because no PrimaryPart has been set, or the PrimaryPart no longer exists. Please set Model.PrimaryPart before using this. 10:17:40.469 - A primary part should be set so that the character can be spawned correctly"

I am not sure what I should do if someone could help that'd be great.

2 answers

Log in to vote
0
Answered by
karlo_tr10 1233 Moderation Voter
3 years ago

You don't have to make the script to set PrimaryPart. You can do it by clicking PrimaryPart property on model instance then after than clicking the part you want to become Primary (in Workspace or Game Explorer). In case you need to do it through the script you must change the script you provided to fit your needs (instead of workspace path of it should lead to character model). If you have any questions comment down below.

0
Thank you. SyncSim 4 — 3y
Ad
Log in to vote
0
Answered by
Rynappel 212 Moderation Voter
3 years ago

This should help you https://developer.roblox.com/en-us/api-reference/property/Model/PrimaryPart

0
Thanks SyncSim 4 — 3y

Answer this question