I'm trying to change the rotation of the pet, because whenever I play it the pet is the other way.

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 where do I put the rotation and how do I do it?

1 comment

0

wow dude format your text in a code block. sheash