This ability system has no delay between pressing ability key and casting the ability but position where the ability spawns is behind, so for example when I walk forward then ability spawns behind me and if I walk to the left then ability is slightly on my right.
This is not a server latency issue.
Yes I used ai and it cant fix the issue.
#Ability position delayed
1 messages · Page 1 of 1 (latest)
local HitboxUtil = {}
-- Creates a visible hitbox part, calls onHit for each humanoid hit, then cleans up
function HitboxUtil.CreateHitbox(params)
-- params: {CFrame, Size, Duration, Creator, OnHit}
local part = Instance.new("Part")
part.Anchored = true
part.CanCollide = false
part.CanQuery = false
part.CanTouch = true
part.Size = params.Size or Vector3.new(4,4,4)
part.CFrame = params.CFrame
part.Transparency = 0.3
part.Color = Color3.fromRGB(255,0,0)
part.Material = Enum.Material.ForceField
part.Name = "AbilityHitbox"
part.Parent = workspace
local touched = {}
part.Touched:Connect(function(hit)
local humanoid = hit.Parent and hit.Parent:FindFirstChild("Humanoid")
if humanoid and not touched[humanoid] and humanoid.Parent ~= params.Creator then
touched[humanoid] = true
if params.OnHit then
params.OnHit(humanoid)
end
end
end)
task.delay(params.Duration or 0.2, function()
if part then part:Destroy() end
end)
return part
end
return HitboxUtil
delay is always the same
it this image the hitbox should be in front of me instead of on me
Its called client-server delay
** You are now Level 7! **
😭
its not
I have 1000 ping
so it should be delayed by 1 second
but it is delayed by it looks like 1 tick
Dude
so few miliseconds
😭
?

everything is instant except for the position
I once put it on server side and then there was hige delay but now the delay is very short
but it still exist and idk how to fix that
this is the delay and it is always like that, ping doesnt change it
this is how should it always be:
** You are now Level 2! **
Just change the spawning distant a slightly forward