Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why will these animations not work on a real server?

Hello, so I have two different tools with these two pieces of code as local scripts in either Tool one named Taunt and one named sword accordingly.

Code for Taunt:

Tool = script.Parent
local player = game.Players.LocalPlayer
repeat wait() until player.Character ~= nil
local hum = player.Character:WaitForChild("Humanoid")



Tool.Activated:connect(function(mouse) 
	local animation = Tool.Taunt
local AnimTrack = hum:LoadAnimation(animation)
        AnimTrack:Play()

Tool.Unequipped:connect(function()
    AnimTrack:Stop()
end)
    end)

Code for Sword:

local Tool = script.Parent
local player = game.Players.LocalPlayer
repeat wait() until player.Character ~= nil
local hum = player.Character:WaitForChild("Humanoid")



Tool.Activated:connect(function(mouse) 
	local animation = Tool.Taunt
local AnimTrack = hum:LoadAnimation(animation)
        AnimTrack:Play()
wait(0.5)
    AnimTrack:Stop()
end)

My issue is when I do a test play by pressing f6, if I equip either tool it allows me to play both animations depending on what I have equipped. When in a real game with a real roblox server however it does not allow me to play the sword's animation and instead only the taunt will work. I'm guessing that the taunt is overriding this and not allowing the sword to function. Is there a way to fix this?

I have already tried changing the swords variables to differ from the Taunt tools but it still does not work.

3 comments

0

For both tools you load the 'Taunt' animation when the tool is equipped ??

0

Umm yes currently, it isnt the same animation each tool has an animation in its part and im too lazy to rename it.

0

Do you get any error in console? If you don't know how to open it in a real game, press f9.

1 answer

The problem to my question was that the animations where on my personal account where the game was on my group's dev page therefore the group technically owned the game and did not allow me to use my animations as they where "not trusted" by the game.

This discussion is preserved as it was. New answers, comments, and votes are closed.