So this is the script i have but don't know how to make so when the player doesn't move the pet still bounces a bit in the air.

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)


			newPet.CanCollide = false

			while wait() do
				bodyPos.Position = humRootPart.Position + Vector3.new(3, 3, 4)
				bodyGyro.CFrame = humRootPart.CFrame
			end

		end
	end
end

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

1 comment

0

Anyone can help me?