I want the player to start an animation I have made when they click a brick. I have filtering enabled turned on. Here is the LocalScript for them to send the event to start the event/animation
script.Parent.tool.detector.ClickDetector.MouseClick:Connect(function()
print("local script")
script.Parent.animate:FireServer(2435453180)
print("local script")
end)
This is the script that receives the event
script.Parent.animate.OnServerEvent:Connect(function(player,animationID)
local animation = Instance.new("Animation")
animation.AnimationId = "http://www.roblox.com/Asset?ID="..animationID
local loadedAnimation = game.Workspace[player.Name].Humanoid:LoadAnimation(animation)
loadedAnimation:Play()
print("Server script")
end)
When I hit play and click the button it does nothing, and the output says nothing.

9 comments
So I put this in the local script (Which is in the StarterGUI) and in the output it says it ends on line 3?
Oh and also line 3 is the local humanoid = character:WaitforChild("Humanoid"), i just removed a line
For some reason I had put tool thinking you were working with one. Updated the code to find the part in workspace. Try again. Let me know if that error shows.
Also from looking at your old code. Make sure that ClickDetector's parent is the part in workspace.
Okay i've made the changes and now the script ends on Line 8. And do you mean that the variable 'tool' has to equal to the part that contains the ClickDetector? If so I believe i've made that correctly
Line 8 for me is: local tool = script.Parent.Parent.Workspace.gen1.tool.detector
You should have my code pasted in a local script inside of StarterCharacterScripts. Then have a part in workspace with a clickdetector inside it.
Okay
THANKS YOU SO MUCH, it works