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)

8 comments
Will replicatedstorage have any adverse effects like starting scripts in the model?
Nope. It's exactly the same as ServerStorage, it just copies to clients so that LocalScripts can use models inside of it.
It still doesn't work and I put it in replicated storage.
And changed the script.
Is there an error? Have you done debugging? This definitely solve the only error you told us about. I can't help you if you can't help yourself
I've been debugging for a while. Now there are no errors but no output either so I don't know what to fix.
If you have been debugging, you would have gotten output -- you should be figuring out what is happening. Debuggin is NOT staring at code and just thinking. It's actually performing experiments.
So how should I debug this? What can I test to make this work?