Im trying to make a gun's barrel move back while shooting, but im stuck here.
local goal = {weapon.BarrelRecoil.Position}
local twinfo = TweenInfo.new(5)
local tw = game.TweenService:Create(weapon.Barrel, twinfo, goal)
tw:Play()
Its a LocalScript, can that be a problem? I dont really know tweening, i dont use it too much. The console writes out Unable to cast to Dictionary.

2 comments
try do FindFirstChild("BarrelRecoil") and FindFirstChild("weapon") before making a dictionary
Its already in the script