My script is supposed to check whenever the player is in the air, but it nothing will happen after the invoke server bit.
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local HumanoidRootPart = Humanoid.Parent:WaitForChild("HumanoidRootPart")
local RemoteFunction = script.Parent.RemoteFunction
local RP = game:FindService("ReplicatedStorage")
local Event = RP.InAir
-----------Animations---------------------
--//Ani 1 (Defualt)//--
local Animation = script.DefualtSwing
local AnimationTrack = Humanoid:LoadAnimation(Animation)
--//Ani 2 (T-Pose)//--
local Animation2 = script.TPoseSwing
local Animation2Track = Humanoid:LoadAnimation(Animation2)
--// Ani 3 (UpsideDown)//--
local Animation3 = script.UpsideDown
local Animation3Track = Humanoid:LoadAnimation(Animation3)
-------------------------------------------
local RopeAmount = Player:WaitForChild("NumberOfHooks"):WaitForChild("Amount")
local EventDB = false
Event:FireServer()
game:GetService("RunService").Stepped:Connect(function()
RemoteFunction.OnClientInvoke = function(player,data,TPoseEquipped,TPoseOwned,GoldenHookEquipped,GoldenHookOwned) --Wont run past here
if Humanoid:GetState() == Enum.HumanoidStateType.Freefall then
if RopeAmount.Value == 1 then
local char = Player.Character
if data == nil then
if TPoseEquipped.Value == false then
AnimationTrack:Play()
AnimationTrack.Looped = true
end
else
if TPoseEquipped.Value == true then
Animation2Track:Play()
Animation2Track.Looped = true
elseif TPoseEquipped.Value == false then
AnimationTrack:Play()
AnimationTrack.Looped = true
end
end
elseif RopeAmount.Value == 0 then
if data == nil then
if TPoseEquipped.Value == false then
AnimationTrack:Stop()
end
else
if TPoseEquipped.Value == true then
Animation2Track:Stop()
elseif TPoseEquipped.Value == false then
AnimationTrack:Stop()
end
end
end
end
end
wait(.5)
end)