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

How do I make duplicated buttons work?

Asked by 9 years ago

I posted a video about this but it wasn't approved. Basically what I am trying to do is use a Tycoon kit. I wan't more step on buttons and items than what is in the kit. So I duplicated the buttons and scripts, changed the item name in the button script to match a new item . It isn't working. I have even used a new button and added the new item name in the script as instructed but it isn't appearing when stepped on. Am I not placing the item head where it belongs or something else I am missing? I have copied what was done in tutorial videos EXACTLY as it was done and it still isn't working for me.

https://www.youtube.com/watch?v=JcX_6zWBtQo

My Video

Script of Buttons I am using in the Kit.===Drop1 was changed to item I wanted to use but item is still visible when game starts and or doesn't appear at all when button is stepped on.


model = script.Parent.Parent.Parent.Drop1 --This is the MODELNAME. you made a desk in the instructions SO name the part called MODELNAME to "Desk". Then change price to what you want.

Upgradecost = 0 -- Replace The Price You Want Where It Says 100

upgradeStuff = model:clone()

wait(1)

model:remove() owner = script.Parent.Parent.Parent.OwnerName local ting = 0

function onTouched(hit) if ting == 0 then ting = 1 check = hit.Parent:FindFirstChild("Humanoid")

if check ~= nil then
if hit.Parent.Name == owner.Value then
    local user = game.Players:GetPlayerFromCharacter(hit.Parent)
    local stats = user:findFirstChild("leaderstats")

    if stats ~= nil then
        local cash = stats:findFirstChild("Cash")
        if cash.Value > (Upgradecost-1) then

            cash.Value = cash.Value - Upgradecost
            upgradeStuff.Parent = script.Parent.Parent.Parent
            script.Parent.Parent:remove()

        end
    end
end
end

ting = 0
end

end

script.Parent.Touched:connect(onTouched)

1
I don't think it's our job to fix a tycoon kit. Free models come eith no warranty and no community support. User#6546 35 — 9y
0
Look up CodeTheorem's tutorials on how to make a tycoon, he takes you through the ins and outs of making a tycoon. Azmidium 388 — 9y

Answer this question