PIancks
(PIancks)
#1
This is my code I use to run the trail. It works, but it comes from the torso/root part area of the char, I want it to come from the head instead,
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
local trail = game.ServerStorage.Trail:Clone()
trail.Parent = char.Head
local attachment0 = Instance.new("Attachment",char.HumanoidRootPart)
attachment0.Name = "TrailAttachment0"
local attachment1 = Instance.new("Attachment",char.Head)
attachment1.Name = "TrailAttachment1"
trail.Attachment0 = attachment0
trail.Attachment1 = attachment1
end)
end)
You have it attached to the HumanoidRootPart so it will come from the root of the player (The center)
PIancks
(PIancks)
#3
What amendments can I change to it?
Head and Head? just move them at top of head and bottom
PIancks
(PIancks)
#5
How do I make it top and bottom
RoBoPoJu
(RoBoPoJu)
#6
Parent both of the attachments to the head. To have them in the right positions, try doing something like this:
local halfHeadSizeY = char.Head.Size.Y/2
attachment0.CFrame = CFrame.new(0, -halfHeadSizeY, 0)
attachment1.CFrame = CFrame.new(0, halfHeadSizeY, 0)
1 Like