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

How do you use string.lower in this? (look in this for an example)

local tecks = script.Parent

tecks.FocusLost:Connect(function(sub)
	if tecks.Text == "god" then
		game.Players.LocalPlayer.Character.Humanoid.Health = math.huge
		game.Players.LocalPlayer.Character.Humanoid.MaxHealth = math.huge
		wait(0.3)
		tecks.Text = ""
	end
end)

How do you use string.lower in this script? for example if you do gOD it reads as god

2 comments

0

do string.lower(tecks.Text)

1

tecks.Text:lower() also switch the health and maxhealth positions, first set MaxHealth to change health (Just another method)

1 answer

✓ Accepted answer
local tecks = script.Parent

tecks.FocusLost:Connect(function(sub)
    if string.lower(tecks.Text) == "god" then
	game.Players.LocalPlayer.Character.Humanoid.MaxHealth = math.huge
        game.Players.LocalPlayer.Character.Humanoid.Health = math.huge
        wait(0.3)
        tecks.Text = ""
    end
end)

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