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.
01 | --Normal variable setup |
02 | local player = game.Players.LocalPlayer |
03 | local char = player.Character |
04 | local debounce = false |
05 |
06 | --Setting up the animation |
07 | local animation = Instance.new( "Animation" ) |
08 | animation.Parent = script.Parent |
09 | animation.AnimationId = "http://www.roblox.com/Asset?ID=21488069" |
10 | local animTrack = char.Humanoid:LoadAnimation(animation) |
11 | --Context Action Service |
12 | local CAS = game:GetService( "ContextActionService" ) |
13 |
14 | --Actual function I want to happen |
15 | function firewall() |
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.