You misspelt FireServer
as FireSever
. There is still an issue with your script.
02 | local famas = game.ServerStorage.FAMAS |
03 | local scarL = game.ServerStorage [ "SCAR-L" ] |
04 | local famasClone = famas:Clone() |
05 | local scarLClone = scarL:Clone() |
06 | local remote = Instance.new( "RemoteEvent" ) |
07 | remote.Parent = game.ReplicatedStorage |
08 | remote.Name = "WeaponEvent" |
10 | remote.OnServerEvent:Connect( function (plr) |
11 | if famasClone.Parent ~ = plr.Backpack then |
12 | famasClone.Parent = plr.Backpack |
14 | if scarLClone.Parent ~ = plr.Backpack then |
15 | scarLClone.Parent = plr.Backpack |
This script would only clone once, and say a different player fires the event, the gun will be taken away from whoever has it.
If this is the desired behaviour, keep it. If not, you should clone the weapon inside the event listener. Not outside of it.
1 | remote.OnServerEvent:Connect( function (client) |
2 | if not client.Backpack:FindFirstChild( "FAMAS" ) and not client.Character:FindFirstChild( "FAMAS" ) then |
3 | famas:Clone().Parent = client.Backpack |
6 | if not client.Backpack:FindFirstChild( "SCAR-L" ) and not client.Character:FindFirstChild( "SCAR-L" ) then |
7 | scarL:Clone().Parent = client.Backpack |
Notice the additional check on the character. When you equip a tool it is parented to your character. So they can't give themselves as many tools as they want.