I am trying to make an animation play when I click using my tool I have created. I have two scripts. One script is a local script. It is inside the tool, which is inside the starterpack. Here is the script:
script.Parent.Activated:Connect(function() game.ReplicatedStorage.RemoteEvent:FireServer(2063032185) end)
The second script is a regular script inside of the Workspace. Here it is:
game.ReplicatedStorage.RemoteEvent.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() end)
According to the tutorial I watched, this should load my animation. When I click using the tool, in the output I get the error message "RemoteEvent is not a valid member of Replicated Storage". Can anyone help fix my problem?
The RemoteEvent doesn't exist in ReplicatedStorage. It's probably in a folder or another object.
Hmmmm, you could also use
WaitForChild is always important!!