Gofven
|
  |
| Joined: 18 Jun 2015 |
| Total Posts: 767 |
|
|
| 26 Mar 2017 08:00 AM |
I cannot find any real reason for this script to stop when there's 1 player in the elevator... why does while wait() loop stops when there's >= 1 player inside the elevator?
local loc = game.Workspace.TcCore.Elevators.Elevator1.Triggers.DisplayG1.SurfaceGui.PlayerList local pO = #game.Teams.Gate1:GetPlayers() local tx = 0 local lx = 0
while wait(1) do print("wait works") pO = #game.Teams.Gate1:GetPlayers() if pO >= 8 then return end for _,v in ipairs(game.Teams.Gate1:GetPlayers()) do if loc:FindFirstChild(v.Name) then return end -- Suspicious looking reason if pO == 2 or pO == 4 or pO == 6 or pO == 8 then tx = 0.5 else tx = 0 end if pO == 3 or pO == 4 then lx = 0.2 else if pO == 5 or pO == 6 then lx = 0.4 else if pO == 7 or pO == 8 then lx = 0.6 end end end local Frm = Instance.new('Frame', loc) Frm.Name = v.Name Frm.Size = UD##############,##.####) Frm.Position = UDim2.new(0 + tx, 0, 0.2 + lx, 0) Frm.BackgroundTransparency = 0.8 Frm.BackgroundColor3 = Color3.new(255, 204, 0) Frm.BorderColor3 = Color3.new(0,0,0) Frm.BorderSizePixel = 5 # #r################ 1 spawn(function() for i = 1, 0.8, -0.01 do wa########## #Fr################ i end end) local IL = Instance.new('ImageLabel', Frm) IL.Image = 'h################################################################. v.Name IL.Size = UDim2.new(0.25, 0, 1, 0) IL.P##########################0,##)## ##.#a######################### I#.#m#################### local TL = Instance.new('TextLabel', Frm) TL.BackgroundTransparency = 1 TL.TextTransparency = 1 TL####### v.Name TL.Position = UDim2.new(0.25, 0, 0, 0) TL.Size = UDim2.new(0.75, 0, 1, 0) TL.Font = 'SciFi' TL.FontSize = 'Size14' TL.TextScaled = true TL.TextWrapped = true TL.TextXAlignment = 'Left' TL.TextColor3 = Color3.new(255, 226, 0) spawn(function() for i = 1, 0, -0.02 do wait(0.01) TL.TextTransparency = i IL.ImageTransparency = i end end) end end |
|
|
| Report Abuse |
|
kazu212
|
  |
| Joined: 25 Jul 2014 |
| Total Posts: 134 |
|
|
| 26 Mar 2017 09:06 AM |
| ######################################################### |
|
|
| Report Abuse |
|
kazu212
|
  |
| Joined: 25 Jul 2014 |
| Total Posts: 134 |
|
|
| 26 Mar 2017 09:07 AM |
| ######################################################## |
|
|
| Report Abuse |
|