of     1   

KOzero
#141290796Wednesday, July 23, 2014 5:55 PM GMT

Why is that? Output:bad argument #1 to 'status' (coroutine expected) print(coroutine.status(On))
klkl
#141290899Wednesday, July 23, 2014 5:56 PM GMT

You need to create a coroutine first. local newThread = coroutine.create(function()
FlamedSkull
#141290933Wednesday, July 23, 2014 5:56 PM GMT

You need to first create a coroutine lol.
HuntHello
#141290951Wednesday, July 23, 2014 5:57 PM GMT

Does on has a reference to a coroutine is it a couroutine? Local on = coroutine.create()?
KOzero
#141290998Wednesday, July 23, 2014 5:57 PM GMT

That isn't the full script.
HuntHello
#141291052Wednesday, July 23, 2014 5:58 PM GMT

Then we can't fully help you.
KOzero
#141291154Wednesday, July 23, 2014 5:59 PM GMT

On = coroutine.wrap(function() repeat for e,z in pairs (v:GetChildren()) do if z.Name =="RIndicator" then z.BrickColor = BrickColor.new("Bright orange") z.Transparency = 0 wait(0.4) z.BrickColor = BrickColor.new("White") z.Transparency = 0.7 wait(0.4) end end until v.VehicleSeat.SeatWeld.Part1.Parent ~= character or v.VehicleSeat.Steer == -1 or Stop == true or v:FindFirstChild("LIndicator").BrickColor == BrickColor.new("Bright orange") coroutine.yield() end) On() --Still not the full script...
klkl
#141291497Wednesday, July 23, 2014 6:02 PM GMT

add on.resume()
HuntHello
#141291537Wednesday, July 23, 2014 6:03 PM GMT

Call on() with coroutine.resume
klkl
#141291592Wednesday, July 23, 2014 6:03 PM GMT

OH lol Hunt's way is correct. I haven't used coroutines in a long time ;)
KOzero
#141291691Wednesday, July 23, 2014 6:04 PM GMT

What's the difference between coroutine.resume(), coroutine.warp() and which is the most efficient.
HuntHello
#141291758Wednesday, July 23, 2014 6:05 PM GMT

Him resume runs the coroutine, wrap creates it
HuntHello
#141291813Wednesday, July 23, 2014 6:06 PM GMT

^wrap creates it, resume runs it
HuntHello
#141291948Wednesday, July 23, 2014 6:07 PM GMT

There is no coroutine.warp
FlamedSkull
#141292280Wednesday, July 23, 2014 6:11 PM GMT

I use coroutine.wrap to ignore a few wait()'s in some of my scripts.
KOzero
#141369115Thursday, July 24, 2014 7:48 AM GMT

Still it stops at until and the script doesn't run again. local Mouse = game:GetService("Players").LocalPlayer:GetMouse() local Player = game:GetService("Players").LocalPlayer local KeyPressed = true local Stop = false Player.CharacterAdded:connect(function(character) Player.Character.Humanoid.Seated:connect(function() Mouse.KeyDown:connect(function(Key) if Key == "e" and KeyPressed == true then KeyPressed = false for i,v in pairs (Workspace:GetChildren()) do if v.Name == "Car" and v.VehicleSeat.SeatWeld.Part1.Parent == character then On = coroutine.create(function() repeat for e,z in pairs (v:GetChildren()) do if z.Name =="RIndicator" then z.BrickColor = BrickColor.new("Bright orange") z.Transparency = 0 wait(0.4) z.BrickColor = BrickColor.new("White") z.Transparency = 0.7 wait(0.4) end end until v.VehicleSeat.SeatWeld.Part1.Parent ~= character or v.VehicleSeat.Steer == -1 or Stop == true or v:FindFirstChild("LIndicator").BrickColor == BrickColor.new("Bright orange") end) coroutine.resume(On) elseif Key == "e" and KeyPressed == false then if v.Name == "Car" then if coroutine.status(On) == "running" then Stop = true repeat wait() until coroutine.status(On) == "dead" Stop = false KeyPressed = true end end end end end end) end) end)
KOzero
#141486806Friday, July 25, 2014 9:10 AM GMT

No-one has an idea how to fix this right?
KOzero
#141499534Friday, July 25, 2014 2:18 PM GMT

Bump
HuntHello
#141512057Friday, July 25, 2014 4:53 PM GMT

Any errors!
KOzero
#141634288Saturday, July 26, 2014 5:51 PM GMT

No errors, the function doesn't trigger the 2nd time and it stops in the repeat stack.

    of     1