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

How to make a billboard gui disappear when a button is stepped on?

Asked by 4 years ago

Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.

Here is the purchase handler. This is a tycoon i am trying to make which is based off of ZTK but i want to have custom text instead of the ugly roblox default text.~~~~~~~~~~~~~~~~~

~~~~~~~~~~~~~~~~~ --[[ All configurations are located in the "Settings" Module script. Please don't edit this script unless you know what you're doing. --]] local Objects = {} local TeamColor = script.Parent.TeamColor.Value local Settings = require(script.Parent.Parent.Parent.Settings) local Money = script.Parent.CurrencyToCollect local Debris = game:GetService('Debris') local Stealing = Settings.StealSettings local CanSteal = false -- don't change or else you won't be able to steal currency

001script.Parent.Essentials.Spawn.TeamColor = TeamColor
002script.Parent.Essentials.Spawn.BrickColor = TeamColor
003 
004function Sound(part,id)
005    if part:FindFirstChild('Sound') then
006        return
007    else
008        local Sound = Instance.new('Sound',part)
009        Sound.SoundId = "rbxassetid://"..tostring(id)
010        Sound:Play()
011        delay(Sound.TimeLength, function()
012            Sound:Destroy()
013        end)
014    end
015end
View all 188 lines...
2
Can you point out the actual part that you need help with? The script is too big and I dont have time to search through it SpiralRBX 224 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

script.Parent:WaitForChild("Buttons") for i,v in pairs(script.Parent.Buttons:GetChildren()) do spawn(function() if v:FindFirstChild("Head") then

001        local ThingMade = script.Parent.Purchases:WaitForChild(v.Object.Value)
002        if ThingMade ~= nil then
003            --print("adding------------------> purchase ",ThingMade.Name)
004            Objects[ThingMade.Name] = ThingMade:Clone()
005            ThingMade:Destroy()
006        else
007            --//Button doesn't have object, remove it
008            error('Object missing for button: '..v.Name..', button has been removed')
009            v.Head.CanCollide = false
010            v.Head.Transparency = 1
011            v.Head.BillboardGui.Enabled = false
012        end
013 
014        if v:FindFirstChild("Dependency") then --// if button needs something unlocked before it pops up
015            v.Head.CanCollide = false
View all 110 lines...

return Objects

Ad

Answer this question