My player gets flung by a wave, this worked fine in R6 but now that I switched to R15 it’s glitchy
(Note: there are very thick invisible walls)
wave hitbox script (ragdoll)
local hitbox = wave.HitPart.Touched:Connect(function(hit)
local char = hit.Parent
if char:FindFirstChild("Humanoid") == nil then return end
local plr = game:GetService("Players"):GetPlayerFromCharacter(char)
if hitlist[char] == true then return end
hitlist[char] = true
-- Tsunami behaviour
RagdollController.RagdollCharacter(char)
task.wait()
char.HumanoidRootPart.AssemblyLinearVelocity = Vector3.new(0, 50, -100) * 1
task.wait(0.1)
task.delay(5, function()
if stophitlist[char] == true then return end
if char.HumanoidRootPart.Velocity == Vector3.new(0, 0, 0) then
stophitlist[char] = true
RagdollController.UnRagdollCharacter(char)
PosFixEvent:Fire(char.Name)
end
end)
hitlist[char] = false
end)
To push the player I use HRP:AssemblyLinearVelocity