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

why is my gear not functionning after being cloned ?

Asked by 4 years ago

so i made twiter codes where after you type the code the script will clone the gear and put it in your backpack it does work when i put it in startpack but with the twiter code methode it does give the gear but it doesn't do any thing at all ( its like i only have the handle).

the script for the code is the following :

local textBox = script.Parent

local code = "TestCode"

local codeRedeemed = script.Parent.CodeRedeemed

local success = script.Parent.SuccessAudio
local invalid = script.Parent.ErrorAudio

textBox.FocusLost:Connect(function(entered, input)

    if not entered then return end

    local codeEntered = textBox.Text


    if codeEntered == code then

        if codeRedeemed.Value == false then         

            codeRedeemed.Value = true

            textBox.Text = "Code successfully redeemed!"
            success:Play()

            local reward = game.ReplicatedStorage.ClassicSword:Clone()
            reward.Parent = game.Players.LocalPlayer.Backpack
        else

            textBox.Text = "Already redeemed!"
            invalid:Play()  
        end

    else

        textBox.Text = "Invalid code!"
        invalid:Play()          
    end 
end)

Please help me i tryed to fix it but it always doesn't work and i even remade everything.

0
on ur script i dont find any problem can u take video? Ariya1234gamer 15 — 4y
0
i don't think you can takes videos and post them here though... amaizing_01 0 — 4y
0
Can you give us the sword script? iiDkOffical 109 — 4y
0
does it only give you the handle? Ashton011 30 — 4y
View all comments (2 more)
0
for the sword its from the roblox catalogue and i switched bteween a few gears and they all were working normally amaizing_01 0 — 4y
0
and it does give the gear with all of the scripts on it as i checked in the explorer amaizing_01 0 — 4y

Answer this question