Just to clarify I'M AN IDIOT, i posted this question before but PASTED THE WRONG CODE so now i have everything right hope someone can help...
I have a very interesting situation, i'm working on a simple GROUP game that should only need 2 animations one for a garden hoe and one for an axe. My problem is the code below:
local player = game:GetService("Players").LocalPlayer local mouse = player:GetMouse() local debounce = false local char = game.Workspace:WaitForChild(player.Name) local hum = char:WaitForChild("Humanoid")local Tool = script.Parent local SlashAnim = Instance.new("Animation") SlashAnim.Name = "toolanim" SlashAnim.AnimationId = "http://www.roblox.com/asset/?id=1928807089" SlashAnim.Parent = Tool SlashAnimLoaded = hum:LoadAnimation(SlashAnim) script.Parent.Activated:Connect(function() if not debounce then debounce = true SlashAnimLoaded:Play() wait(0.9) debounce = false end end) script.Parent.Unequipped:Connect(function() SlashAnimLoaded:Stop() end)
the tool and the basic tool properties are below
https://pasteboard.co/HsjCwkj.png
https://pasteboard.co/HsjCIqE.png
This code should be straight forward and it works in when i click Play but when in a server it prints this error:
https://pasteboard.co/Hsb0ayA.png
This makes no sense and i have tried even more to fix this. I tried pasting and making the necessary changes to detect when a button in a GUI is clicked and it created the same output as above. I have tried using a game created by me, not a group, same result.
I did notice something though and it appears that my tools don't want to cooperate with my animations. I was playing in "Play" mode in studio and had the text button to play the animation. The GUI Text Button loaded the animation with no tool equipped but when i tried literally the same script IN the tool, nothing happened. Someone please help my get my animations to load into my game without this error.
Animations made on your profile only work on games on your profile. Just republish the animations to the group instead of your inventory and replace the AnimationIds and it should work.