Please, if anyone knows how to fix this please help. I've been debugging this for weeks.
This is in a local script in a tool and it doesn't work. It's supposed to clone a model from replicated storage to right in front of your character when you press r and it uses mouse key down. There is no output but it still doesn't work. Can anyone help me?
--Normal variables
local Player = game.Players.LocalPlayer
local char = Player.Character
local Mouse = Player:GetMouse()
local debounce = false
--Animation setup
local A = Instance.new("Animation")
A.AnimationId = "http://www.roblox.com/Asset?ID=211592172"
local track = char.Humanoid:LoadAnimation(A)
function firewall(key)
if key == "r" and not debounce and script.Parent.Equipped == true then
local CF = game.ReplicatedStorage.FireWall:Clone()
CF.Parent = workspace
CF.MainPart.Position = char.Torso.Position + Vector3.new(5,0,0)
CF.Rotation = char.Torso.Rotation --Edit: I capitalised the f in CF here
track:Play()
debounce = true
wait(3)
debounce = false
end
end
Mouse.KeyDown:connect(firewall)
Please, if you can fix this I will upvote every single thing you've posted.
Edit: Followed europes advice, I'm going to test it.

9 comments
line 13 just remove the .Parent = game.Workspace, cause you already have "=" in your variable.
just place it somewhere else, like below the Variable CF.
I did, thank you.
Worked?
I can't test it at school roblox is blocked.
xD, kk
Made a tiny edit
did it work?
Nope. I think I'm going to put this project to rest. It obviously doesn't want to work.