Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why does my script not clone the hopperbin to the player?

Player = game.Players.LocalPlayer

function onClicked()
    
    if Player.Character:FindFirstChild("Gray") == nil then
    if Player.Backpack:FindFirstChild("Gray") == nil then
    Clone = game:GetService("ReplicatedStorage")["Gray"]:Clone()
        Clone.Parent = Player.Backpack
    end
    end
    wait()
    script.Disabled = false
    end
script.Parent.MouseButton1Down:connect(onClicked)

The error disappeared but.. It still doesn't clone.

1 answer

✓ Accepted answer

Discussed over the chat

  • The function wasn't being called
  • He accidentally disabled the script once the function was called
  • Used an improper variable for "Player"

This discussion is preserved as it was. New answers, comments, and votes are closed.