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

How do I make script that checks if any player on the server have pressed a "textbutton" in a gui?

Or a script that checks if a stringvalue has a value

1 answer

✓ Accepted answer

How to check if stringValue has value:

stringValue = game.Workspace.StringValue

if(stringValue.Value ~= "")then 
       print("stringvalue object has a value of ".. stringValue.Value) 
end

alone, this'll only run when the server starts ^^^ but you can check the string's value every time the value changes by using the following event:

stringValue.Changed:Connect(function(newValue)
        print(newValue)
end)

Check if the button was clicked by saying the following:

myButton.MouseButton1Click:Connect(function()
      print("Button clicked")
end)

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