whats wrong with the script?

local player = game.Players.LocalPlayer
local tool = game.ReplicatedStorage.P250lAZER

script.Parent.MouseButton1Down:connect(function()
    if player:FindFirstChild("Backpack") then
        tool:Clone().Parent = player.Backpack
    script.Parent.Parent.Parent.Parent.Visible = false 
    end
end)


local player = game.Players.LocalPlayer
local tool = game.ReplicatedStorage.AK
script.Parent.MouseButton1Down:connect(function()
    if player:FindFirstChild("Backpack") then
        tool:Clone().Parent = player.Backpack
    script.Parent.Parent.Parent.Parent.Visible = false 
    end
end)

1 comment

0

Do you have FilteringEnabled? Check the properties in Workspace