local ReplicatedStorage = game:GetService("ReplicatedStorage")
local makimaEvent = ReplicatedStorage:WaitForChild("makimaEvent")
local plr = players.LocalPlayer
local hrp = plr.Character:WaitForChild("HumanoidRootPart"):: BasePart
local humanoid = hrp.Parent:WaitForChild("Humanoid"):: Humanoid
local allPlayers = players:GetPlayers()
plr.Chatted:Connect(function(message)
local allPlayers = players:GetPlayers()
for _,player in allPlayers do
if (message:lower() == player.DisplayName:lower()
or message:lower() == player.Name:lower())
and player ~= plr then
local target = player
local targetHRP = target.Character:WaitForChild("HumanoidRootPart"):: BasePart
local targetHumanoid = target.Character:WaitForChild("Humanoid"):: Humanoid
local rayOrigin = targetHRP.Position
local direction = Vector3.new(0,-200,0)
local params = RaycastParams.new()
params.FilterType = Enum.RaycastFilterType.Exclude
params.FilterDescendantsInstances = {target.Character}
local rayResult = workspace:Raycast(rayOrigin,direction,params)
if rayResult == nil then return end
local targetPos = rayResult.Position
local targetShirt = target.Character:FindFirstChild("Shirt"):: Shirt
local targetPants = target.Character:FindFirstChild("Pants"):: Pants
local shirtId = targetShirt.ShirtTemplate
local pantsId = targetPants.PantsTemplate
local myAnimator = humanoid:WaitForChild("Animator"):: Animator
local squishAnimation = Instance.new("Animation"):: Animation
squishAnimation.AnimationId = "rbxassetid://88088160344533"
local squishAnimationTrack = myAnimator:LoadAnimation(squishAnimation)
squishAnimationTrack:Play()
local targetAnimator = targetHumanoid:WaitForChild("Animator"):: Animator
local squashAnimation = Instance.new("Animation"):: Animation
squashAnimation.AnimationId = "rbxassetid://87272749576622"
local squashAnimationTrack = targetAnimator:LoadAnimation(squashAnimation)
squashAnimationTrack:Play()
makimaEvent:FireServer(targetPos,targetHRP,shirtId,pantsId,targetHumanoid)
end
end
end)
I’m pretty sure its just some stupid mistake I’ve made, but can anyone see why my animation might not be playing, the animation priority is action and I uploaded the animations myself