How would I use a couroutine and assign a parameter inside it in a while true do loop

its not working for me so heres my script

Noob= coroutine.wrap(function(ObjectToMakeTransparent)

while true do

rs.RenderStepped:Wait()

ObjectToMakeTransparent.Transparency = ObjectToMakeTransparent.Transparency + .01

end

end)

and I am trying to use it inside a while true do loop

while wait() do

StartButtonClone = StartButton:Clone()--StartButtonClone is a text label

StartButtonClone.Parent = ScreenGui.Frame

StartButtonClone.Position = StartButton.Position

TS:Create(StartButtonClone, TweenInfo.new(.2, Enum.EasingStyle.Quad), {Size = UDim2.new(0.604, 0,0.150, 0)}):Play()

coroutine.resume(Noob(StartButtonClone)) -- This is where the couroutine is being used

but it keeps saying 11:08:27.419 - Players.Halmuni.PlayerGui.1stLoadingScreen.PlayLabelTweening:23: bad argument #1 to 'resume' (coroutine expected)

1 comment