#Tackling

1 messages · Page 1 of 1 (latest)

little fern
#

I have right now when the player joins the game it gives then a jersey hitbox and i cant figure out how when those 2 hitboxes meet it will throw the player on the ground. I also would like it if they can only tackle people from the other team (Home and Away) and if it can check if the player has a ball in there hands and if they dont have a football it cant / wont tackle them

sullen warren
#

hmmm

slow lion
#

1 simple word, ragdoll

lost cairn
sullen warren
#

for hitbox detection , use hitbox.Touched event when one jersey hitbox touches another, get the players from both characters using Players:GetPlayerFromCharacter()

compare player1.Team ~= player2.Team before allowing tackle

Look for football in player.Character:FindFirstChild("ball") or player.Backpack:FindFirstChild("ball")
Set Humanoid.PlatformStand = true and apply downward/backward force with BodyVelocity
slow lion
sullen warren
#

hmmmmmmm

#

there is double tackle logic ?

if hasFootball(thisPlayer) then
    flingCharacter(character, TACKLE_STRENGTH)
elseif hasFootball(otherPlayer) then
    flingCharacter(otherChar, TACKLE_STRENGTH)

the RunService.Heartbeat positioning might be bad if you have many players... consider welding the jersey to the character instead

since this script is in the jersey part (script.Parent) youll need one script per jersey...Make sure its a server script for proper replication

consider using Motor6D or WeldConstraint instead of constant repositioning

other than that , youre cool