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

grouped part(Pet) please help?

script

local pet = script.Parent

function givePet (player)
 if player then
	 local character = player.Character
  if character then
   local humRootPart = character.HumanoidRootPart
   local newPet = pet:Clone() 
   newPet.Parent = character
   
   local bodyPos = Instance.new("BodyPosition", newPet)
   bodyPos.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
   
   local bodyGyro = Instance.new("BodyGyro", newPet)
   bodyGyro.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
   
   while wait() do
    bodyPos.Position = humRootPart.Position + Vector3.new(2, 2, 3)
    bodyGyro.CFrame = humRootPart.CFrame
   end
  end
 end
end

game.Players.PlayerAdded:Connect(function(player)
 player.CharacterAdded:Connect(function(char)
  givePet(player)
 end)
end)

so my script works on 1 block. but if i added more blocks and grouped it, it doesn't work! please help!?

1 answer

✓ Accepted answer

There is actually another way of grouping objects without "grouping" it.

Select all the parts and then go to the Model tab in Roblox Studio, there you should see a button called "Union". This makes all the parts into one.

If this helped please accept this answer.

1 comment

0

probably... accepted!

This discussion is preserved as it was. New answers, comments, and votes are closed.