Hi there, currently there is a dummy in the workspace which I am trying to get to animate when a user presses a button inside the starterGui. However, its working in roblox studio but not inside the actual game. I've got no idea what to do. I assumed it had something to do with where I placed the script (which is inside the starter gui) and I attempted to put the script into workspace but I didn't know how to trigger the script from the starter gui. Can anyone help me please?
script.Parent.MouseButton1Click:connect(function()
for i,v in pairs(game.Workspace:GetChildren()) do
if v.Name == "Dummy" then
local x = v.Humanoid:LoadAnimation(v.Animation)
x:Play()
end
end
end)
Sorry if this was a stupid question :l

2 comments
Is this a normal Server Script or a LocalScript?
Ah wait, since it is in StarterGui, you're gonna need RemoteEvents because only a Server Script can make animations visible for all the players.