Hello, I am currently animating a motor6D gun for the first time and I’m trying to make the magazine inside my gun go transparent for a brief period, This effect works in the animation editor but not in my tool. Is there something I need to script inside my tool to make the magazine go transparent? Thanks!
Animation in moon animator:
Animation inside my tool:
Here’s my code, i think this has everything related to the animation im having issues with
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local M6D = Instance.new("Motor6D", char:WaitForChild("Right Arm")) -- or the part that you have decieded
M6D.Name = "ToolGrip"
char.ChildAdded:Connect(function(child)
if child:IsA("Tool") and child:FindFirstChild("BodyAttach") then
M6D.Part1 = child.BodyAttach
end
end)
end)
end)
local function ReloadAni()
local ReloadAni = tool.Parent:WaitForChild("Humanoid"):LoadAnimation(tool.Reload)
ReloadAni:Play()
end
local function Reload()
if reloading.Value ~= true then
if CurrentClip.Value >= MaxClip.Value then end
if CurrentAmmo.Value <= 0 then end
reloading.Value = true
ReloadAni()
local FillAmount = math.min(MaxClip.Value - CurrentClip.Value, CurrentAmmo.Value)
reloadsound:Play()
task.wait(reloadtime)
CurrentClip.Value = CurrentClip.Value + FillAmount
CurrentAmmo.Value -= FillAmount
updategui()
reloading.Value = false
end
end