I keep wondering that why is the animation working in roblox studio instead of roblox itself.
Here are the videos.
Studio:
robloxapp-20200525-1901213.wmv (2.2 MB)
In game:
robloxapp-20200525-1900410.wmv (2.6 MB)
function LoadProperly(ID)
local inst = ID
local anim = script.Parent.Humanoid:LoadAnimation(inst)
return anim
end
local IA = nil
local LDN = nil
local RA = nil
local AA = nil
local ATA = nil
function Get_slotanims()
wait(0.1)
if IA then--cancel any anim active
IA:Stop()
end
if LDN then
LDN:Stop()
end
if RA then
RA:Stop()
end
if AA then
AA:Stop()
end
if ATA then
ATA:Stop()
end
script.AnimChache:ClearAllChildren()
local item = script.Parent:FindFirstChild("REPLICATEDITEM")
if item then
print("E")
if item.Configuration:FindFirstChild("CharAnims") then
if item.Configuration.CharAnims:FindFirstChild("Idle") then
IA = LoadProperly(item.Configuration.CharAnims.Idle)
IA:Play()
end
if item.Configuration.CharAnims:FindFirstChild("LoadUp") then
LDN = LoadProperly(item.Configuration.CharAnims.LoadUp)
LDN:Play()
end
if item.Configuration.CharAnims:FindFirstChild("Reload") then
RA = LoadProperly(item.Configuration.CharAnims.Reload)
end
if item.Configuration.CharAnims:FindFirstChild("Aim") then
AA = LoadProperly(item.Configuration.CharAnims.Aim)
end
if item.Configuration.CharAnims:FindFirstChild("Slice") then
ATA = LoadProperly(item.Configuration.CharAnims.Slice)
end
end
end
end
I can’t seem to run this in an actual game but the studio runs perfectly, does anyone know how to fix this?