Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why won't this textbutton make another textbutton visible?

Okay, so I'm working on a game and I'm trying to make this button make another button visible. It was working splendidly until I made the button that I want to turn visible bigger, and it broke for some reason. I tried making the button visible to make sure that you can see it, and you can, it's just the script that doesn't work anymore. It's a local script and no errors. Script:


local toggle = false
script.Parent.MouseButton1Click:Connect(function()
	if toggle == false then
	toggle = true
	script.Parent.Parent.Parent.Frame.FeedTheTabby.Visible = true
	
	else
	
	toggle = false
	
	end
end)

Thank you!

4 comments

0

So wait. This is the code to make the other button appear visible?

0

@spot, Hi thanks for replying, yes it is the code.

0

And the button is in startergui right?

0

@spot, The button is in a frame in a starter gui in a startergui.

1 answer

✓ Accepted answer

Ok so, this is a common mistake that newer scripters make. I myself made this mistake when I first started. This script is editing the gui in StarterGui while what the player sees is located in the player folder in PlayerGui. You will need to use Remote Events to communicate with the server that the client pressed the button. The developer wiki has a good article on this found at this link: https://developer.roblox.com/en-us/articles/Remote-Functions-and-Events. If after using remote events, it still doesnt work feel free to ask another question!

4 comments

0

Hi, thank you for responding! That link is not available anymore, would you mind re-sending it or something? Thank you!

0

Try now, it should work. Sorry about that!

0

Thank you so much!

This discussion is preserved as it was. New answers, comments, and votes are closed.