So if there is a part called "DoorTrigger" in workspace and i want to find it by just typing "doortrigger" how would i do that?
How to find something in workspace without having to use capitalization?
2 answers
local function findPart(fromParts, searchWord)
for i, part in pairs(fromParts) do
if part.Name:lower() == searchWord:lower() then
return part
end
end
end
print(findPart(workspace:GetChildren(), "doortrigger"))
Now this is an example code that I just put together, but it should do the work of showing you how you can think.
To explain what part.Name:lower() does it takes the string, which is the name of the Part, and makes all letters lowercase. "DoorTrigger":lower() = "doortrigger".
local game.Workspace.DoorTrigger = DoorTrigger
or if you do not want to do a varibile
game.Workspace.DoorTrigger
or
workspace.DoorTrigger
when you do game before workspace then workspace has a capitalized W so Workspace and when you do no game before it you do workspace all lowercase.
1 comment
One, you didn't really read and understand the askers question, but it was nice of you to try to give an answer. And two, have you been away from coding? Because you've actually flipped the way you make a variable. The name of the variable first, then the value of it.
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
One way, which is the first way I think of, is to get all parts that is in Workspace. Then checking each one to the string you typed but lowered. Check string.lower() https://developer.roblox.com/en-us/api-reference/lua-docs/string