Help on Respawn Button

I’m pretty new to programming but I made a script in which pressing a button would respawn a set. It just positions the old set to the original place. But my set has a ragdoll dummy which is a grouped model.

help

That is my script, but I also realized that grouped models don’t have the position property. And my only idea around this is by doing dummy..Position = Vector3.new = (x, y, z). I would have to do it for every part and again I’m new to scripting. Is there other way to shorten the script not saying the same things a thousand times? Thanks

you need to clone these models using :Clone(), or it’ll only affect the original objects.

Models have a neat function named Model:SetPrimaryPartCFrame():

local Cframe = CFrame.new(Position,Rotation)
SomeModel:SetPrimaryPartCFrame(Cframe )

If you want to know more: Model | Documentation - Roblox Creator Hub

1 Like