Hello! I am wondering how to take away a space in the name of an object. For example, an object named “Example Object” it(function/feature) would find and delete the space to turn it into “ExampleObject” Does roblox have a built in feature I could use to do this? If not how would I make a function that returns the string without spaces.
local str = "My Text"
local strWithoutSpace = string.gsub(str, "%s+", "")
-- replaces all characters matching the "%s+" pattern with ""
print(strWithoutSpace) -- prints "MyText"