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

Is there a way to spawn in a mesh rig through script?

Asked by 6 years ago

I've tried to do it with Instance.new but it didn't work

local NPC = Instance.new("CreateMeshRig", game.Workspace)
0
CreateMeshRig isn't an object. Thats why. PyccknnXakep 1225 — 6y
0
Oh, but is there a way to spawn one in through script or no rilgundam 65 — 6y
0
Why would you want to do this, anyways? T0XN 276 — 6y
0
I'm making a game that has NPCs spawn with a script and skins in them. I'm spawning a random number of them. rilgundam 65 — 6y
View all comments (5 more)
0
Plz help me if u can. rilgundam 65 — 6y
0
But why are you using rigs and not NPCs you made.... Rigs are for animating.. T0XN 276 — 6y
0
yea because I need to insert decals/meshes through script into the npc rilgundam 65 — 6y
0
Well you should have explained that in your question first... T0XN 276 — 6y
0
Sorry, but is there a way? rilgundam 65 — 6y

1 answer

Log in to vote
0
Answered by
T0XN 276 Moderation Voter
6 years ago
Edited 6 years ago

I'd recommend you NOT to use animation rigs. I'm not sure why you'd want to use those, but it's probably best if you didn't. Make your own or get and customize a free model one. In addition, you cannot instantiate the rig, as it is not an instance. I'm pretty sure you can create your own NPC with mesh parts in it? Not entirely sure.

Instead of trying to create the rig from scratch using the script, it would be preferable that you have your rig already created, and stored in the the game's ServerStorage. This way you can use your script to clone the NPC out of the storage and into the Workspace with ease.

local NPC = game:GetService('ServerStorage'):WaitForChild('NPC')

game.Players.PlayerAdded:connect(function(Player)
    NPC:Clone().Parent = workspace
end)
0
Ohhh, I see what you mean. That is genius!! Thanks so much!! rilgundam 65 — 6y
Ad

Answer this question