I'm having difficulty on this one, I was wanting to change only the y's axis.
Main help part of script:
local part = Instance.new("Part", workspace[plr.Name].Torso) part.CanCollide = false part.Anchored = true part.Size = Vector3.new(1, 1, 1) part.Position = Vector3.FromAxis(Enum.Axis.Y + 10) -- ? -- (or) part.Position = Vector3.FromAxis(Enum.Axis.Y(Enum.Axis.Y + 10)) -- ?
Whole script:
local plr = game.Players.LocalPlayer wait(2) local part = Instance.new("Part", workspace[plr.Name].Torso) part.CanCollide = false part.Anchored = true part.Size = Vector3.new(1, 1, 1) part.Position.Y = part.Position.Y + 5 local mesh = game.ReplicatedStorage.Pet mesh:Clone().Parent = part local direction = CFrame.new(part.Position, plr.Character['Left Leg'].Position).lookVector local increment = direction * 4 while true do wait() part.CFrame = game.Workspace[plr.Name]['Torso'].CFrame + (direction * increment) + Vector3.new(-5, 0, 0) part.Rotation = game.Workspace[plr.Name]['Torso'].Rotation + (direction * increment) + Vector3.new(-1, -2, increment) end
I would appreciate any help.
How are you trying to position your part? If you wanted to position it 10 studs above the torso, it would be something like:
part.CFrame = CFrame.new(torso.Position + Vector3.new(0,10,0))
where you would set the torso variable to the player's torso.