local PlayersService = game:GetService("Players")
local debounce = false
local debounce2 = false
local stopPoints = false
local taskCoro = coroutine.create(function(Time, stopPoints)
while not stopPoints do
task.wait(1)
Time.Value += 1
end
coroutine.yield()
end)
ground.Touched:Connect(function(Hitbox)
if not debounce then
debounce = true
stopPoints = false
local Character = Hitbox.Parent
local Player = PlayersService:GetPlayerFromCharacter(Character)
local points = Player:WaitForChild("Data").Points
local combo = Player:WaitForChild("Data").Combo
local Time = Player:WaitForChild("Data").Time
local success = coroutine.resume(taskCoro, Time, stopPoints)
while not stopPoints do
points.Value += combo.Value
task.wait(0.08)
end
debounce = false
end
end)
ground.TouchEnded:Connect(function(Hitbox)
if not debounce2 then
debounce2 = true
ground.CanTouch = false
stopPoints = true
local Character = Hitbox.Parent
local Player = PlayersService:GetPlayerFromCharacter(Character)
local points = Player:WaitForChild("Data").Points
local combo = Player:WaitForChild("Data").Combo
for i = 0, 4, 1 do
points.Value += combo.Value
task.wait(0.08)
end
task.wait(1)
ground.CanTouch = true
debounce2 = false
end
end)```
#Coroutines do not coroutine
24 messages · Page 1 of 1 (latest)
how to you know they dont work?
you made prints?
what is specifically not working?
task.spawn() 
my love
ill get to the specifics
does that allow multi threading
so i did all that and it came off suspended
is it because it yeilds in the coroutine because the variable is ignored in the loop
thats hot wym
yuh
yes
booleans are not referenced they are copied
oh thas great
ty
I didnt help much, dont thank me lol
was thanking every1