Hey I am making a game and wrote a script to play a emote when you press a key and it does work in studio but in the the game (not in studio test) it dosent work this is my script
local player = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local character = player.Character or player.CharacterAdded:Wait()
local Humanoid = character:WaitForChild("Humanoid")
local uis = game:GetService('UserInputService')
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://6712486204"
-- bla bla bla bla
function onKeyPressed(inputObject,gameProcessEvent)
if inputObject.KeyCode == Enum.KeyCode.R then
Humanoid:LoadAnimation(anim):Play()
print("Animation is playing")
end
end
uis.InputBegan:Connect(onKeyPressed)

2 comments
Is the game made by you or by your group? Animations must be created by same owner as the place to be able to load.
by my group well published by my group so should i make the animation published aas my group?