You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I’m trying to make a pet’s position go opposite of the player’s head position. Essentially I want the pets position to be always behind the player -
What is the issue? Include screenshots / videos if possible!
I’ve got it to somewhat work with, but when I look directly at the pet It doesn’t move. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve discussed with a friend and they didn’t have a solution either
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
The pet system works, but I’m confused on how to go further with the system
local equipPetEvent = game.ReplicatedStorage.equipPet
local petPosition = {}
local TweenService = game:GetService("TweenService")
equipPetEvent.OnServerEvent:Connect(function(plr, nameOfPet)
for i, v in pairs(game.ServerStorage:GetChildren()) do
if v.Name == nameOfPet then
local clonedPet = v:Clone()
clonedPet.Parent = workspace
table.insert(petPosition, clonedPet)
local increment = #petPosition
while wait() do
local newPetTween = TweenService:Create(clonedPet, TweenInfo.new(0.1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {Position = plr.Character.HumanoidRootPart.Position - Vector3.new(-5 * increment, 0, 0)})
newPetTween:Play()
end
end
print("Entered text does not match any pets")
end
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.