Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Coroutine doesn't do wait?

Asked by
war8989 35
10 years ago

For some reason this code does not work for me, I never see "DONE" in the output, nor does it say it's not running. How can I fix this?

1coroutine.resume(coroutine.create(function()
2    print(coroutine.running())
3    wait(30)
4    print("DONE")
5end))

Full Script:

001_G.MaxWalkSpeed = 40
002_G.DefWalkSpeed = 16
003_G.MaxHealth = 500
004_G.DefMaxHealth = 200
005_G.MaxArmor = 100 -- In Percent
006_G.DefArmor = 0
007_G.Defaults = {["WalkSpeed"] = 16, ["MaxHealth"] = 200, ["Armor"] = 0}
008 
009database = {}
010 
011_G.TakeDamage = function(name, damage)
012    player = game.Players:findFirstChild(player)
013    if(player) then
014        if(player.Character) then
015            noid = player.Character.Humanoid
View all 142 lines...

1 answer

Log in to vote
0
Answered by 10 years ago

This is for my LocalPlayer Admin {Tablets}

1coroutine.resume(coroutine.create(function()
2game:GetService("RunService").Stepped:connect(function()
0
This script is actually made to run Server-Side, because I want the server to execute events. Letting the client have that power would be bad and would open-up problems in the future. Thanks for the idea though. war8989 35 — 10y
0
No problem thumbs up ;D jillmiles1 3 — 10y
Ad

Answer this question