So this has been quite annoying,here is a example script.
local Part = Instance.new("Part") Part.Parent = game.Workspace Part.Position = game.Players.LocalPlayer.Character.Torso.Position Part.Anchored = true Part.CanCollide = false Part.Size = Vector3.new(10,1,10)
So whats going on,is that i instance this part,but instead of going in the torso's position,it goes above the player's head,I'm guessing it has to do with collisions,but,how do i fix it?
I Nyeed help AAAAAAAAAAAAAAAAAAAAAAAAAAAA
Except on a few specific situations, changing the position of a part will place the part in the closest open space above other parts. If you want the Part to appear in the same space as player's torso, you should set the CFrame of the Part to the Torso's CFrame.
Also, changing the Size property after changing the Position or CFrame of the part will cause the part to appear above player in the next open spot above the player.
local Part = Instance.new("Part", workspace) --less typing for setting parent Part.Anchored = true Part.CanCollide = false Part.Size = Vector3.new(10, 1, 10) -- set size before CFrame Part.CFrame = character.Torso.CFrame
as an extra note: since this uses CFrame, the part will have the same rotation matrix of the Torso's CFrame. If you don't want the part to have the torso's rotations, use this line instead (last line in previous example):
Part.CFrame = CFrame.new(character.Torso.Position)