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

How Do I Make A GUI Stickers Collector?

Asked by
ImfaoXD 158
8 years ago

How do I make a GUI stickers collector? Like when you see an item such as Sonic the hedgehog sticker laying on the ground and you touch it and then the picture show up in the GUI. How can I do that? Or it is impossible to make one?

0
This isn't very clear. Just run a Touched listening event to check for touching a certain brick with a certain decal, and then when it's touched, make some pre-made Imagelabel in a ScreenGui visible, or Instance.new() one in with the correct properties. Legojoker 345 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

You put the image id in a value in a folder in Workspace, and you give the sticker on the ground the same name as the number value in the folder. Then, create an onTouch() function. Make it look for the value with the name of the part that got touched. Once it's found it, look for the player of object that touched it. Then if it returns true, it simply makes the image on the gui visible. Like this:

game > Workspace > ImageHolder > SanicSticker

' game > Workspace > SanicSticker > Script V '

local p = script.Parent
p.Touched:connect(function(hit)
    local h  = hit.Parent;FindFirstChild("Humanoid")
    if h then
        local name = p.Name
        local find = game.Workspace.ImageHolder:FindFirstChild(name)
        if find then
            local player = game.Players:GetPlayerFromCharacter(hit.Parent)
            if player then
                local gui = player.PlayerGui:FindFirstChild("StickerGui")
                if gui then
                    local f = gui:FindFirstchild(p.Name,true)
                    if f then
                        f.Visible = true
                    end
                end
            end
        end
    end
end)
0
So, where do I put this script? ImfaoXD 158 — 8y
0
This script goes into the part that you touch to get the sticker. The part has to be named exactly the same as the one in the folder, and the one in the gui. TheDeadlyPanther 2460 — 8y
0
If you need help, PM EmeraldSlash (he is my main, but he got kicked from SH) and I will make a model of it. TheDeadlyPanther 2460 — 8y
0
Alright, thank you bro! ImfaoXD 158 — 8y
0
No problem. TheDeadlyPanther 2460 — 8y
Ad

Answer this question