This is in a local script in a tool. It uses context action service to call a function when you press R, it clones a part from server storage and plays an animation and it doesn't work at all. The output says something is wrong with line 19.
Edit:Fixed errors and it still won't work.
--Normal variable setup local player = game.Players.LocalPlayer local char = player.Character local debounce = false --Setting up the animation local animation = Instance.new("Animation") animation.Parent = script.Parent animation.AnimationId = "http://www.roblox.com/Asset?ID=21488069" local animTrack = char.Humanoid:LoadAnimation(animation) --Context Action Service local CAS = game:GetService("ContextActionService") --Actual function I want to happen function firewall() if debounce then return end local CF = game.ServerStorage.Wall:Clone() CF.Parent = script.Parent CF.MainPart.Position = char.Torso.Position + Vector3.new(5,0,0) CF.MainPart.Rotation = char.Torso.Rotation animTrack:Play() debounce = true wait(5) debounce = false end script.Parent.Equipped:connect(function() CAS:BindActionToInputTypes("wall", firewall, false, "r") end) script.Parent.Unequipped:connect(function() CAS:UnbindAction("wall") end)
LocalScripts don't have access to anything in ServerStorage (clients don't get copies of things there -- this means when players connect they don't have to load these things, which can speed up joining).
Use ReplicatedStorage for things that LocalScripts need to have access to.