Hello! I’m making a move that ends air combos by slamming the player downwards into the ground and making a crater effect under them but I’m facing an issue…
The tween is not even playing correctly even though I am deleting the body position responsible for holding the player in the air.
I am not even sure if using Tweenservice is viable for what I am doing but I cant think of anything else…
Any help is appreciated!!!
Video:
Code Snippet:
local parts = workspace:GetPartsInPart(hitbox, overlap)
local personHit
for i,v in pairs(parts) do
if v.Parent:FindFirstChild("Humanoid") and personHit == nil then
personHit = v.Parent
local params = RaycastParams.new()
params.FilterType = Enum.RaycastFilterType.Blacklist
overlap.FilterDescendantsInstances = {character, hitbox, personHit}
local destroyed = false
if FFC(personHit.HumanoidRootPart, "AirCombo") then
FFC(personHit.HumanoidRootPart, "AirCombo"):Destroy()
destroyed = true
else
destroyed = true
end
repeat wait() until destroyed
warn("destroyed aircombo")
local under = workspace:Raycast(personHit.HumanoidRootPart.Position, Vector3.new(0,-100,0), params)
if under then
warn("under hit")
local tween = tweenService:Create(personHit.HumanoidRootPart, TweenInfo.new(0.2), {CFrame = CFrame.new(under.Position+ Vector3.new(0,personHit.HumanoidRootPart.Size.Z + 1,0)) * CFrame.Angles(math.rad(90),0,0)})
tween:Play()
end
local info = {
punch = true,
blockable = false,
damage = 5,
stun = 1,
}
TagHumanoid.Fire(character, v.Parent, info)
end
end