what string datatype do in roblox piano
In Roblox piano, a string datatype is just text, like "C" or "c#" or
"4", stored as characters instead of a number. In piano scripts, strings are
usually used to represent the note names or key labels before the script
converts them into actual sounds or key presses.
What it means
- A string can hold letters, numbers, symbols, or combinations of them.
- In Roblox/Luau, strings are written in quotes, like
"hello"or"A4".
- For piano systems, strings often act like note IDs, for example
"C","D","E", or custom sheet-music codes.
Why it matters in piano games
- The script can read a string and decide which note to play.
- This is useful when a song is stored as text, because the game can parse each character or token.
- A string is not the sound itself; it is the label the script uses to pick the sound or action.
Simple example
"C"= a text value for the note C.3= a number value."3"= a string, not a number.
Tiny Roblox example
lua
local note = "C"
print(type(note)) -- string
That means the value is text, which a piano script can then interpret as a note name.
TL;DR: In Roblox piano, a string datatype is text used to name notes or keys, and the script reads that text to know what to play.