Gui Playbutton help

Hello!

I am having a script-related issue,

script:

The script works fine with no errors except:
The scripts after click don’t enable themselves, even though “Disable” is a Property of Scripts/LocalScripts.

Also any help on how to FULLY disable the PlayButton

1 Like

Your error seems to be a simple syntax error on the first line, you’re missing a closing parenthesis after function(

instead of: function(

it should be: function()

Hope this helps!

4 Likes

One more thing I forgot to mention, anything you do to the UI on StarterGui will not do anything. If you want to access the UI within a player you need to set it up like this:

local Player = game.Players.LocalPlayer --this is your player
local PlayerGui = Player:WaitForChild("PlayerGui") --this is where the players GUI's are stored at.
--You will need to use PlayerGui instead of StarterGui. 
--If you have any questions feel free to message me on the forums!

That would remove the piece separating Connect/Function so if i did that it would look like:
Connectfunction() but ty

Could you explain this more to me please?

My goal is to re enable it once the “PlayButton” Has been clicked.

you can’t make a frame a mouse clicker. You must create a ImageButton and clear the image to create clickable frame.

Do not put game.StarterGui. since its in local script
put
If in local script

function PlayerIsReadyToPlay()
script.Parent.Parent.Parent.Enabled = false
script.Parent..Parent.Parent.ControlLabel.ControlPopup.Disabled = false
script.Parent.Parent.Parent.TextLabel.MainScript.Disabled = false
end

script.Parent.MouseButton1Click:Connect(PlayerIsReadyToPlay)

if in script (ServerScriptService)

function PlayerJoined(player)
local function PlayerIsReadyToPlay()
player.PlayerGui:WaitForChild("ScreenGui", 10).ControlLabel.ControlPopup.Disabled = false
player.PlayerGui:WaitForChild("ScreenGui", 10).TextLabel.MainScript.Disabled = false
player.PlayerGui:WaitForChild("ScreenGui", 10).menu.Enabled = false
end
player.PlayerGui:WaitForChild("ScreenGui", 10).menu.TextButton.MouseButton1Click(PlayerIsReadyToPlay)
end
game.Players.PlayedAdded:Connect(PlayerJoined)
1 Like

hmm isn’t working, is there anything shorter too?

can you atleast tell me the error? or there’s no error at the output?