Roblox INTERMEDIATE Lua Scripting Tutorial - 'While True Do' and 'If'

Опубликовано: 14 Июль 2026
на канале: Roblox News 2010
5,513
23

This video shows Roblox Intermediate scripting. You will be learning the "while true do" and "if" statement. If you have any questions, leave it in the comment section below.

First script:

while true do
wait(0.01)
if game.Workspace.Value.Value == true then
game.Workspace.Player.Humanoid.Health = game.Workspace.Player.Humanoid.Health + 1
elseif game.Workspace.Value.Value == false then
game.Workspace.Player.Humanoid.Health = game.Workspace.Player.Humanoid.Health - 1
end
end