Hi so my problem is that i want this two scripts to work in one but it doesnt work:
--code 1 example local flashlight = ... while true do --code end
--code 2 local run = game:GetService("RunService") local char = script.Parent run.Heartbeat:Connect(function() --code end)
how would i fuse this two into one code?
if you put the code 2 before the code 1 or use task.spawn
why do you need to put it in one script?? well if you need to then dont use task.spawn() because: the more threads then more lags on server just put code 2 before code 1 so code 1 doesn’t yield thread with while loop
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.