can someone please help- the attack "mainHollow" goes to the inital lookvector instead of changing when the player looks a different way: ..........local rayParams = RaycastParams.new()
rayParams.FilterType = Enum.RaycastFilterType.Exclude
rayParams.FilterDescendantsInstances = {Char,workspace.World.FX,game.Players:GetChildren()}
local function GetFinalPos()
local rayOrigin = HRP.Position
local velocity = 110
local rayDirection = HRP.CFrame.LookVector * velocity
local result = workspace:Raycast(rayOrigin, rayDirection, rayParams)
if result then
return result.Position
else
return rayOrigin + rayDirection
end
end
anim:GetMarkerReachedSignal("throw"):Connect(function()
print("marker")
local finalpos = GetFinalPos()
debris:AddItem(mainPos,0)
mainHollow.Anchored = true
local mainTween = game:GetService("TweenService"):Create(mainHollow,TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.Out),{
CFrame = CFrame.new(finalpos)
})