Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why will these animations not work on a real server?

Asked by 8 years ago
Edited 8 years ago

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.

0
For both tools you load the 'Taunt' animation when the tool is equipped ?? User#5423 17 — 8y
0
Umm yes currently, it isnt the same animation each tool has an animation in its part and im too lazy to rename it. JazzyUnder 18 — 8y
0
Do you get any error in console? If you don't know how to open it in a real game, press f9. FrostTaco 90 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

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.

Ad

Answer this question