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 pop up?

Asked by 8 years ago

i would really like to know how i can make a GUI pop up for example if you have an obby with 30 stages and the player is at stage 25 then i would like to know how i can make a GUI pop up saying Final five this is the answer i got from the last question i asked

function onTouch(hit)
    local character = hit.Parent
    local Player = game.Players:GetPlayerFromCharacter(character)
    local sound = Instance.new("Sound")
sound.SoundId = "-- replace this with a sound ID (keep the Quotes)"
sound.Parent = Player.PlayerGui
sound:Play()
end
script.Parent.Touched:connect(onTouch)

you can use this yourself to make music in diffrent areas i would just really like to know how

1 answer

Log in to vote
1
Answered by 8 years ago

local Part = script.Parent Part.Touched:connect(function() -- Different type of function local Plr = game.Players.LocalPlayer local Gui = game.ServerStorage.ScreenGui local Sound = Instance.new("Sound", Gui) Sound.SoundId = "" --Put ID here local GuiClone = Gui:Clone() GuiClone.Parent = Plr.PlayerGui Sound:Play() wait(4) Gui:remove() end)

Their it is, if you want to change the name of the gui you will also need to change the name if the gui in the script and redirect it if you did not put it in the ServerStorage . and if you dont want the gui to remove over a certain time remove line where it has a wait and the remove and insert a close button. Hope this helped.

0
thx tordenask 1 — 8y
Ad

Answer this question