eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
|
| 16 Apr 2016 03:03 PM |
So I have this Weapon Inventory, that's suppose to sort it the items in the StarterGear into a Gui but the weapons aren't loading for the client?
It works ingame of a non laggy place and it works on solo for the laggy place but not ingame for the laggy place. Also it works in ServerMode studio in laggy place.
Server:
repeat wait() until #StarterGear:GetChildren() > 0 for _,v in pairs(StarterGear:GetChildren()) do if v:IsA("Tool") then Amount = Amount + 1 end end print(Amount) Remote:InvokeClient(p) Remote.OnClientInvoke = function() local Amount = 0 for _,v in pairs(StarterGear:GetChildren()) do if v:IsA("Tool") then Amount = Amount + 1 end end print(Amount)
For Non laggy places (Output):
1 1
For laggy places:
1 0
Any reason why or how to prevent this?
|
|
|
| Report Abuse |
|
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
| |
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
| |
|
ikiled
|
  |
| Joined: 15 Jun 2012 |
| Total Posts: 575 |
|
|
| 16 Apr 2016 04:03 PM |
use :WaitForChild()
hope this helps
swag | ikiled | scripter |
|
|
| Report Abuse |
|
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
|
| 16 Apr 2016 04:05 PM |
How? I don't know what to :WaitForChild() because not every player has the same items.
|
|
|
| Report Abuse |
|
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
| |
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
| |
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
| |
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
|
| 16 Apr 2016 07:55 PM |
Wtf this doesnt even work for localScript:
while wait(10) do local Amount = 0 for _,v in pairs(StarterGear:GetChildren()) do if v:IsA("Tool") then Amount = Amount + 1 end end print(Amount) if Amount > 0 then break end end
Always print 0 ingame but WORKS FINE in Studio and ServerMode (Studio)
|
|
|
| Report Abuse |
|
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
|
| 16 Apr 2016 08:14 PM |
can player even access stuff in StarterGear? I think they can right? It's their StarterGear
|
|
|
| Report Abuse |
|
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
| |
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
|
| 16 Apr 2016 08:56 PM |
| so I just tested it by removing and reading parts and it's defiantly lag or toomany bricks causing this |
|
|
| Report Abuse |
|
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
| |
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
| |
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
| |
|
| |
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
| |
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
| |
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
| |
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
|
| 17 Apr 2016 09:35 AM |
| omggg it's been like 24 hourss |
|
|
| Report Abuse |
|
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
|
| 17 Apr 2016 10:03 AM |
| Doesn't even work with FE off |
|
|
| Report Abuse |
|
|
eRanged
|
  |
| Joined: 15 Jun 2013 |
| Total Posts: 9746 |
|
| |
|