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

How do i locate the sound in playergui ???

Asked by
Bulvyte 388 Moderation Voter
8 years ago

So i've got this "intromusic" i'm using i got sound in startergui and when player goes into game and clicks "skip intro" button which should remove the intro music sound in his playergui but how i locate the PlayerGui ? when the names can be random, what do i put in ?

print("Skip button loaded")

button = script.Parent
Screen = script.Parent.Parent.Parent
IntroMusic = game.Players -- <<<<<< right here how do i locate it ?

function onClicked(GUI)
    Screen:remove()
    IntroMusic:remove()
end
script.Parent.MouseButton1Click:connect(onClicked)
0
idk if this is the answer, but when i think its just "game.Players.Player.PlayerGui.--Your sound name"    thats what i do for my gambling system that uses PlayerGui nicros 165 — 8y
0
i've tried it game.Players.Player.PlayerGui.S1 didn't work... :/ Bulvyte 388 — 8y
0
Anyone, please ? Bulvyte 388 — 8y

1 answer

Log in to vote
0
Answered by
lsp425 0
8 years ago

It is game.Players.LocalPlayer in a localscript.

Ad

Answer this question