hello there, In most of all guns they have a "OnKeyDown" function that when you press r that reloads the gun. What i am trying to do is make the guns mag which is a meshpart in side the gun tool, to turn the transparency to 1, that way, when the reload animation plays, the mag transparency would be 1, and when the animation stops the transparency would go back to normal.
How would i type that in this line of code? thanks for help!
function OnKeyDown(key)
if string.lower(key) == 'r' then
Reload()
if RecoilTrack then
RecoilTrack:Stop()
end
end
end

2 comments
when you say index of mag what do you mean by that?
late reply but like model.Mag the dot is a index just instead of mag use where ever the mag is