I would like someone to help me fix my script and help me understand what and why it happened.
I want my script to play an Animation to the persons humanoid who touched the part
I’ve tried printing in different areas in the code to see if it was maybe something to do with the code but nothing seems to be a problem. There are no errors either until I printed the humanoid that is touching the part which gave me this error: Property “Animator.EvaluationThrottled” is not currently enabled. (x7) - Studio
Local Script:
local uis = game:GetService("UserInputService")
local re = game.ReplicatedStorage:WaitForChild("Re")
local module = require(game.ReplicatedStorage.ModuleScript)
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanrp = character:WaitForChild("HumanoidRootPart")
local debounce = false
uis.InputBegan:Connect(function(input, gamepros)
if input.KeyCode == Enum.KeyCode.E then
local hitbox = module.hitbox(humanrp,humanrp.CFrame * CFrame.new(0,0,-3))
hitbox.Touched:Connect(function(x)
if x.Parent:WaitForChild("Humanoid") and debounce == false then
debounce = true
re:FireServer(x)
end
end)
end
end)
Server Script:
local re = game.ReplicatedStorage.Re
local function onSer(player, x)
print("touched")
local humanoid = x.Parent:WaitForChild("Humanoid") --enemy humanoid
local animation = Instance.new("Animation") --animation
animation.Parent = x.Parent:WaitForChild("Humanoid")
animation.AnimationId = "http://www.roblox.com/asset/?id=17355218654"
x.Parent:WaitForChild("HumanoidRootPart").Anchored = false --making them stop in place
local animationTrack = humanoid:LoadAnimation(animation)
end
re.OnServerEvent:Connect(onSer)