Can anyone see a problem with what is indexed below? I have made sure the variables are correctly found, I have tested this script in game with a report-error thing, and it doesn't show an error. (Yes, there is more to the script, this is just a piece of it.)
elseif string.sub(string.lower(msg),1,13) == "openFrontDoor" then
mdoor.Transparency = 0.4
mdoor.CanCollide = false
elseif string.sub(string.lower(msg),1,14) == "closeFrontDoor" then
mdoor.Transparency = 0
mdoor.CanCollide = true

2 comments
Thanks!
msg:lower():sub(1,13) is a much shorter way to write the same thing!