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

(Fixed)Can somone help me with this button issue?

Asked by 9 years ago

here is my problem

I have a tycoon that you walk on buttons to purchase stuff

I have it set up so when you purchase the basement the button will disappear and another button will be under it.

that it will auto hit and make a small piece of the floor disappear.

I have been working on this problem for a few hours now.

this should work but it is not.

the script is in the part that is being touched(button)

the FloorBoard is declared below. (the part to disappear)

the head is declared as well ( will disappear as well)(Part of the button)

the stairs is in the purchases folder until the button to buy it is hit(as long as you can afford it)

then it is moved to the PurchasedObjects folder were it should be found when you hit the second button.

by all accounts this should work but it is not... and there are no errors in the output window..

maybe I am just not seeing something, can someone help please...

thanks...

FloorBoard = script.Parent.Parent.FloorBoard
Head = script.Parent
Destroy = script.Parent.Parent.Parent.Parent.PurchasedObjects.Stairs.One.Transparency

script.Parent.Touched:connect(function()
        if Destroy == 0 then

    FloorBoard.Transparency = 1
    FloorBoard.CanCollide = false   
    Head.Transparency = 1
    Head.CanCollide = false 

    end         
end)
0
Try removing the .Transparency on the "Destroy" variable, and then add it onto the Destroy == 0 on line 06 as Destroy.Transparency. Wizzy011 245 — 9y
0
I tried that snipers0076 5 — 9y

Answer this question