Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is my tool not cloning into players backpack?

Asked by 3 years ago
Edited 3 years ago

Ok so I have a textbutton in a gui that when clicked, its supposed to check if a boolvalue in the player is true, and if so it will clone a specified tool from replicated storage, but it doesnt work. Any ideas why? Script:

script.Parent.MouseButton1Down:Connect(function()
    local player = game.Players.LocalPlayer
    local Sharingan = game.ReplicatedStorage.KG:FindFirstChild("Itachi Mangekyou"):Clone()
    local ItaShar = player.KGvalues:FindFirstChild("Sharingan")
    ItaShar:GetPropertyChangedSignal("Value"):Connect(function()
        if ItaShar.Value == true then
            Sharingan.Parent = player.Backpack
        end
    end)
end)

Its in a localscript btw

1 answer

Log in to vote
0
Answered by 3 years ago

you can't clone item with local script. You need RemoteEvent

0
Oh ok, ill try it Sabertooth11123 38 — 3y
Ad

Answer this question