I’m currently trying to make a ground pound move where the player comes down from the air and creates a wave. But when I change the CFrame of the hrp, it gets detached from the body.
(Local) Script:
moves[6] = function(caster, info)
local hum = caster:WaitForChild("Humanoid")
if info.GroundPound then
print("groundpounding")
local humRoot = caster:WaitForChild("HumanoidRootPart")
info["GetCharges"] = true
local charges = actionRemote:InvokeServer("Moves/Spells", caster, info)
print(charges)
if not charges then return end
vs.RubleCircle({
Part = humRoot,
RingAmount = 15,
SizeMin = charges * 2,
SizeMax = charges * 4,
Radius = 10,
Char = caster,
})
screenshake:Fire(3, 30, 60, humRoot.Position)
return
end
if hum.FloorMaterial ~= Enum.Material.Air then return end
local pChar = info.Player.Character or info.Player.CharacterAdded:Wait()
local humRoot = caster:WaitForChild("HumanoidRootPart")
if not info.IsCharge then
if caster == pChar then
humRoot.Anchored = true
hum.AutoRotate = false
-- play animation
actionRemote:InvokeServer("Moves/Spells", caster, info)
end
else
local rayParams = RaycastParams.new()
rayParams.FilterDescendantsInstances = {caster}
rayParams.FilterType = Enum.RaycastFilterType.Blacklist
rayParams.IgnoreWater = true
if caster == pChar then
local distance = workspace:Raycast(humRoot.Position, Vector3.new(0,-500,0), rayParams)
if not distance then return end
local dis = (humRoot.Position - distance.Position).Magnitude
task.wait(.02 * dis)
humRoot.Anchored = false
humRoot.CFrame = CFrame.new(distance.Position + Vector3.new(0,3,0))
-- humRoot.CFrame = caster:WaitForChild("UpperTorso").CFrame - Vector3.new(0,.2,0)
hum.AutoRotate = true
info["GroundPound"] = true
actionRemote:InvokeServer("Moves/Spells", caster, info, "Client")
end
end
end
Video: