So the only one that would work would be 0, because there is no limiting. lets say i want to show a shade on someone's screen depending if their health is low enough, like in between 50 and 40 then it would get darker if it went to 40 to 30.
I would have to write something like this:
01 | local humanoid = game:GetService( "Players" ).LocalPlayer.Character.Humanoid |
03 | humanoid.HealthChanged:Connect( function (health) |
04 | if humanoid.Health < = 100 and 61 then |
05 | script.Parent.ImageTransparency = 1 |
06 | elseif humanoid.Health < 60 and 50 then |
07 | script.Parent.ImageTransparency = 0.9 |
08 | elseif humanoid.Health < 50 and 40 then |
09 | script.Parent.ImageTransparency = 0.8 |
10 | elseif humanoid.Health < 40 and 30 then |
11 | script.Parent.ImageTransparency = 0.6 |
12 | elseif humanoid.Health < 30 and 20 then |
13 | script.Parent.ImageTransparency = 0.4 |
14 | elseif humanoid.Health < 20 and 5 then |
15 | script.Parent.ImageTransparency = 0.3 |
the and inside the code is like the thing that limits it.
This code below should work the way you want it.
01 | local TitleGUI = game:GetService( "ServerStorage" ):WaitForChild( "Title" ) |
02 | 02 game.Players.PlayerAdded:Connect( function (player) |
03 | 03 player.CharacterAdded:Connect( function (character) |
04 | 04 local titleguiclone = TitleGUI:Clone() |
05 | 05 local Wins = player.leaderstats.Wins |
06 | 06 if Wins.Value < = 4 and 0 then |
07 | 07 titleguiclone.Parent = game.Workspace:WaitForChild(player.Name).Head |
09 | 09 titleguiclone.TextLabel.Text = "Noob" |
10 | 10 elseif Wins.Value < = 9 and 5 then |
11 | 11 titleguiclone.Parent = game.Workspace:WaitForChild(player.Name).Head |
13 | 13 titleguiclone.TextLabel.Text = "Beginner" |
14 | 14 elseif Wins.Value < = 14 and 10 then |
15 | 15 titleguiclone.Parent = game.Workspace:WaitForChild(player.Name).Head |
17 | 17 titleguiclone.TextLabel.Text = "Decent" |
18 | 18 elseif Wins.Value < = 29 and 15 then |
19 | 19 titleguiclone.Parent = game.Workspace:WaitForChild(player.Name).Head |
21 | 21 titleguiclone.TextLabel.Text = "Very Decent" |
22 | 22 elseif Wins.Value < = 44 and 30 then |
23 | 23 titleguiclone.Parent = game.Workspace:WaitForChild(player.Name).Head |
25 | 25 titleguiclone.TextLabel.Text = "Above Average" |
26 | 26 elseif Wins.Value < = 59 and 45 then |
27 | 27 titleguiclone.Parent = game.Workspace:WaitForChild(player.Name).Head |
29 | 29 titleguiclone.TextLabel.Text = "Gamer" |
30 | 30 elseif Wins.Value < = 74 and 60 then |
31 | 31 titleguiclone.Parent = game.Workspace:WaitForChild(player.Name).Head |
33 | 33 titleguiclone.TextLabel.Text = "Pro" |
34 | 34 elseif Wins.Value < = 99 and 75 then |
35 | 35 titleguiclone.Parent = game.Workspace:WaitForChild(player.Name).Head |
37 | 37 titleguiclone.TextLabel.Text = "Amazing" |
38 | 38 elseif Wins.Value < = 114 and 100 then |
39 | 39 titleguiclone.Parent = game.Workspace:WaitForChild(player.Name).Head |
41 | 41 titleguiclone.TextLabel.Text = "Awesome" |
42 | 42 elseif Wins.Value < = 149 and 115 then |
43 | 43 titleguiclone.Parent = game.Workspace:WaitForChild(player.Name).Head |
45 | 45 titleguiclone.TextLabel.Text = "Ultra" |
46 | 46 elseif Wins.Value < = 199 and 150 then |
47 | 47 titleguiclone.Parent = game.Workspace:WaitForChild(player.Name).Head |
49 | 49 titleguiclone.TextLabel.Text = "Chad" |
50 | 50 elseif Wins.Value < = 100000 and 200 then |
51 | 51 titleguiclone.Parent = game.Workspace:WaitForChild(player.Name) |
53 | 53 titleguiclone.TextLabel.Text = "The One" |
I hope this resolved your problem.
Have a good day!
- Zeta