local cd = script.Parent function onclick(Player) print("PassedTheFunction") if Player.PlayerGui:FindFirstChild("BoomGui") == nil and game.Workspace:FindFirstChild("LocalSoundForBoomBox") == nil then print("les get it started in ere") game.ReplicatedStorage.BoomGUI:Clone().Parent = Player.PlayerGui print("It should give it to us!") end end 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
local cd = script.Parent local function onclick(Player) print("PassedTheFunction") if Player.PlayerGui:FindFirstChild("BoomGui") == nil and game.Workspace:FindFirstChild("LocalSoundForBoomBox") == nil then print("les get it started in ere") game.ReplicatedStorage.BoomGUI:Clone().Parent = Player.PlayerGui print("It should give it to us!") end end cd.MouseClick:connect(onclick)
local cd = script.Parent function onclick(Player) print("PassedTheFunction") if Player.PlayerGui:FindFirstChild("BoomGui") == nil and game.Workspace:FindFirstChild("LocalSoundForBoomBox") == nil then print("les get it started in ere") game.ReplicatedStorage.BoomGUI:clone().Parent = Player.PlayerGui --clone() not Clone() print("It should give it to us!") end end cd.MouseClick:connect(onclick)