You can write your topic however you want, but you need to answer these questions:
What do you want to achieve?
trying to get it to work with the humanoidrootpart lookvector
What is the issue? I can’t get the code to work with LookVector, it might have something to do with the count and split variable. Heres what theyre for
Here’s what I have rn
local count = 0
local split = -7
local size = 4
mouse.Button2Down:Connect(function()
local bpx = hrp.Position.X
local bpz = hrp.Position.Z
local hcf = hrp.CFrame.LookVector
count = 0
split = -7
size = 4
for i = 1,15 do
wait()
count += 3
split += 0.3
size -= 0.1
local p1 = part1:Clone()
local p2 = part2:Clone()
p1.Parent = workspace.Effects
p2.Parent = workspace.Effects
p1.Position = Vector3.new(bpx+count,10,bpz-split)
p2.Position = Vector3.new(bpx+count,10,bpz+split)
if there are any better way to do it, please tell me, i would appreciate it
might be some minor issues, i just cant figure it out, thank you
pretty sure its heavily got to do with the count variable, where if its plus it will go frontward, if the count is min, it will go backward as mentioned earlier, i have no experience with this kind of things
the split variable might be causing issues too for the script. I’m trying to look for a way to do this, if there are any forums dedicated to this, pwease shawe
So with CFrames the documentation is great! I can roughly explain what I think you need.
local Offset = CFrame.new(1,0,-5)
Part.CFrame = Part.CFrame * Offset
-- this will move the part 1 stud to the side, 0 studs up, and 5 studs forward from its original CFrame! So a part that's "looking down" will move down 5 studs.
Part.CFrame = Part.CFrame + Vector3.new(0,10,0) -- this will move the part up 10, no matter what the original CFrame is! So no matter what way its looking it will always move up.
Setting a parts CFrame is a much more accurate way to move parts usually!
You cannot change lookVector itself, because it’s read-only. But you can do some math to get the direction of other faces. lookVector is the direction of the Part’s FrontFace, so using this we can get the other faces pretty simply;