How Come A Section Of My Code Never Runs In My Local Script?
I'm making a Greeting Gui to go with my chat commands and things aren't going to well. It seems that ROBLOX Studio isn't running a section of my code, the part where the text is set and the check on the player's permission is done. An reason why?
Code
01 | local Player = game.Players.LocalPlayer |
02 | local PlayerGUI = Player.PlayerGui |
03 | local StartMenu = PlayerGUI:WaitForChild( "StartMenu" ) |
04 | local Text = StartMenu:WaitForChild( "Text" ) |
06 | local PromptStartMenu = game.ReplicatedStorage.PromptStartMenu |
08 | PromptStartMenu.OnClientEvent:Connect( function (Table) |
09 | ModulePlayerNms = Table |
11 | function CheckPlayerPerm(PlayerToCheck, ModuleToSearch) |
13 | for _, plr in pairs (ModuleToSearch) do |
14 | if PlayerToCheck.Name = = plr then |
15 | IfPlayer = PlayerToCheck |
17 | if IfPlayer ~ = nil then |
24 | for Transparency = 1 , 0 , -. 01 do |
25 | Text.BackgroundTransparency = Transparency |
28 | local TextString = "Thank You For Using J-Commands! This Is Still In BETA Phase So Except Some Bugs..." |
29 | local IfAdminText = "Welcome, " ..Player.Name.. " You Have Permission To Use Commands!" |
30 | if Text.BackgroundTransparency = = 0 then |
31 | for i = 1 , #TextString do |
32 | Text.Text = string.sub(TextString, 1 , i) |
36 | if CheckPlayerPerm(Player, ModulePlayerNms) then |
37 | for i = 1 , #IfAdminText do |
38 | Text.Text = string.sub(IfAdminText, 1 , i) |
45 | for Transparency = 0 , 1 , . 01 do |
46 | Text.BackgroundTransparency = Transparency |
47 | Text.TextTransparency = Transparency |
Area that doesn't run
01 | local TextString = "Thank You For Using J-Commands! This Is Still In BETA Phase So Except Some Bugs..." |
02 | local IfAdminText = "Welcome, " ..Player.Name.. " You Have Permission To Use Commands!" |
03 | if Text.BackgroundTransparency = = 0 then |
04 | for i = 1 , #TextString do |
05 | Text.Text = string.sub(TextString, 1 , i) |
09 | if CheckPlayerPerm(Player, ModulePlayerNms) then |
10 | for i = 1 , #IfAdminText do |
11 | Text.Text = string.sub(IfAdminText, 1 , i) |