|
| 22 Jan 2017 04:54 PM |
| I'm trying to repeat wait(0.1) until players stats but it wont repeat why help |
|
|
| Report Abuse |
|
|
|
| 22 Jan 2017 05:02 PM |
I'm afraid you're going to have to be more descriptive.
Would you mind showing us the script in question? |
|
|
| Report Abuse |
|
|
|
| 22 Jan 2017 05:06 PM |
local event = Instance.new("RemoteEvent") event.Name = "animate" event.Parent = game.Workspace event.OnServerEvent:connect(function() repeat wait(0.1) print("waiting") until game.Players.LocalPlayer.IDa.Value == "1" print("passed") local Idle1 = game.Workspace.NPC1:WaitForChild("Idle1") local Idle2 = game.Workspace.NPC1:WaitForChild("Idle2")
local anim1 = game.Workspace.NPC1.Humanoid:LoadAnimation(Idle1) local anim2 = game.Workspace.NPC1.Humanoid:LoadAnimation(Idle2)
anim1:Play() end) |
|
|
| Report Abuse |
|
|
|
| 22 Jan 2017 05:09 PM |
| the event works without the repeat loop... so idk whats going on |
|
|
| Report Abuse |
|
|
Soybeen
|
  |
| Joined: 17 Feb 2010 |
| Total Posts: 21462 |
|
|
| 22 Jan 2017 05:38 PM |
You can't get "game.Players.LocalPlayer" from a server script You need to use the first argument, that is
YourEvent.OnServerEvent:connect(function(player) repeat wait() until player.leaderstats.blahblah == "blah" print("works") end)
|
|
|
| Report Abuse |
|
|