Previously I used FastCast module for casting a large fireball but it doesn’t work as intended, since the module itself is created for small projectiles like bullets. So right now I am looking for better methods. I was using a module that creates a hitbox in where the projectile lands and it works perfectly so yeah my problem isn’t about the hitbox. It is about detecting where projectile lands or touches something. What can I use in this case? I have checked a lot of posts and saw some people suggesting GetPartsInPart and Raycast/Shapecast but I really don’t understand how I can use them in this case. Can someone explain please?
But how? Don’t shape casts instantly arrive to their destination? How can I make it follow the projectile?
You could fire a short in length (a unit of 1 for example) each step
Alright so I did this but there are some flaws that I don’t know how I can fix.
remote.OnServerEvent:Connect(function(player, action, variable3)
local character = player.Character
local fireball = fireballRS:Clone()
if action == "Z" then
fireball.Parent = workspace
fireball.CFrame = character.Head.CFrame
local fireballBV = Instance.new("BodyVelocity")
fireballBV.MaxForce = Vector3.new(1e6,1e6,1e6)
fireballBV.Velocity = CFrame.new(fireball.Position, variable3).LookVector * 60
fireballBV.Parent = fireball
local params = RaycastParams.new()
params.FilterType = Enum.RaycastFilterType.Exclude
params.FilterDescendantsInstances = {player.Character}
local direction = fireball.CFrame.LookVector * 10
local hasHit = false
while hasHit == false do
wait()
local results = workspace:Blockcast(CFrame.new(fireball.Position), blockCast.Size, direction, params)
if results then
hasHit = true
fireball:Destroy()
local indicatorC = indicator:Clone()
indicatorC.Parent = workspace
indicatorC.CFrame = CFrame.new(results.Position)
print("hit")
end
end
end
end)
I used blockcast for a dash move before but it was on player character so the lookvector worked well. But in this case when the player turns and shoots the fireball then the lookvector of it still stays the same as far as I understand. So as a result the hit indicator appears in ground behind the fireball. What should I do?