✓ Accepted answer
When you call the waitt() function, put it into a spawn() function, so it should look like this:
function waitt()
wait(10)
end
value.Changed:connect(function()
blah blah
blah blah just some code
spawn(waitt())
blah blah
end
Honestly, I have never used the spawn() function before, but im 99% sure that this will achieve what you want to do.
Alternatively, you can do coroutines:
function waitt()
wait(10)
end
value.Changed:connect(function()
blah blah
blah blah just some code
local coro = coroutine.create(waitt)
coroutine.resume(coro, 'whatever parameters u want for waitt() go into here where this string is')
blah blah
end
Again, I have never used coroutines, however I have read about them and I'm also 99% sure that they will achive the desired effect for you :D
2 comments
you can use 2 scripts and use remote functions to make the script trigger
http://wiki.roblox.com/index.php?title=Global_namespace/Roblox_namespace#spawn