01 | local cd = script.Parent |
02 |
03 | function onclick(Player) |
04 | print ( "PassedTheFunction" ) |
05 | if Player.PlayerGui:FindFirstChild( "BoomGui" ) = = nil and game.Workspace:FindFirstChild( "LocalSoundForBoomBox" ) = = nil then |
06 | print ( "les get it started in ere" ) |
07 | game.ReplicatedStorage.BoomGUI:Clone().Parent = Player.PlayerGui |
08 | print ( "It should give it to us!" ) |
09 | end |
10 | end |
11 |
12 | cd.MouseClick:connect(onclick) |
The script runs, I see all of the prints in the output, no errors in the output, doesn't give the the "BoomGUI". Please help.
Make local cd = script.Parent to cd = script.Parent
make it a local function
01 | local cd = script.Parent |
02 |
03 | local function onclick(Player) |
04 | print ( "PassedTheFunction" ) |
05 | if Player.PlayerGui:FindFirstChild( "BoomGui" ) = = nil and game.Workspace:FindFirstChild( "LocalSoundForBoomBox" ) = = nil then |
06 | print ( "les get it started in ere" ) |
07 | game.ReplicatedStorage.BoomGUI:Clone().Parent = Player.PlayerGui |
08 | print ( "It should give it to us!" ) |
09 | end |
10 | end |
11 |
12 | cd.MouseClick:connect(onclick) |
01 | local cd = script.Parent |
02 |
03 | function onclick(Player) |
04 | print ( "PassedTheFunction" ) |
05 | if Player.PlayerGui:FindFirstChild( "BoomGui" ) = = nil and game.Workspace:FindFirstChild( "LocalSoundForBoomBox" ) = = nil then |
06 | print ( "les get it started in ere" ) |
07 | game.ReplicatedStorage.BoomGUI:clone().Parent = Player.PlayerGui --clone() not Clone() |
08 | print ( "It should give it to us!" ) |
09 | end |
10 | end |
11 |
12 | cd.MouseClick:connect(onclick) |