01 | player = { "WindowMall" } |
02 | local players = game:GetService( "Players" ) |
03 | local replicatedstorage = game:GetService( "ReplicatedStorage" ) |
04 | local hatsfolder = replicatedstorage:WaitForChild( "Hats" ) |
05 | local Dominus = hatsfolder:WaitForChild( "Dominus" ) |
06 |
07 | for i,plr in pairs (players:GetPlayers()) do |
08 | local check = false |
09 | if players.Name = = player [ 1 ] then |
10 | return true |
11 | else |
12 | return false |
13 | end |
14 | print (check) |
15 | end **** |
also i had a gui when i click the text it will fire
You can, actually.
You can print a boolean using a built-in function called tostring(value)
. In a nutshell, tostring()
turns any value into a string. For example:
1 | local var = true |
2 | print ( tostring (var)) --true |
In your case, on line 14, you should change print(check)
to print(tostring(check))
Edited Code:
01 | player = { "WindowMall" } |
02 | local players = game:GetService( "Players" ) |
03 | local replicatedstorage = game:GetService( "ReplicatedStorage" ) |
04 | local hatsfolder = replicatedstorage:WaitForChild( "Hats" ) |
05 | local Dominus = hatsfolder:WaitForChild( "Dominus" ) |
06 |
07 | for i,plr in pairs (players:GetPlayers()) do |
08 | local check = false |
09 | if players.Name = = player [ 1 ] then |
10 | return true |
11 | else |
12 | return false |
13 | end |
14 | print ( tostring (check)) --edited |
15 | end **** |