This is my script, why it can't clone a tool from lightning?
01 | local ReplicatedStorage = game:GetService( "ReplicatedStorage" ) |
03 | local cloneEvent = game.ReplicatedStorage.cloneEvent |
05 | local function cloneTool(Player,Tool) |
06 | script.Weapon.Value = Tool |
07 | local clone = game.Lighting:FindFirstChild(script.Weapon.Value):Clone() |
08 | clone.Parent = game.Players:FindFirstChild(Player).Backpack |
11 | cloneEvent.OnServerEvent:Connect(cloneTool) |
This suppose to copy a weapon with a lauched name from lightning
but it give this error:
Workspace.Cloner:7: attempt to index nil with 'Clone'