(The code seems to work as once I select properties on the script as it says that the code is no longer disabled, however, the code doesn’t begin functioning. The script it causes to no longer be disabled is:
while true do
wait(5)
game.Workspace.TEST1.Transparency = 1
wait(5)
game.Workspace.TEST1.Transparency = 0
end
What does this do? Sorry if I sound a bit stupid, I’m new to this so I’m unsure of what function the spawn does, I’m assuming it creates the code or something, but I honestly don’t know.
well, spawn works like another script inside a script.
For example:
--Infinite Loop 1
---Some code -- This won't work since the first loop is not ended yet.
--Infinite Loop2
When using a spawn function:
spawn(function()
--Infinite Loop 1
-- The code in here will act like it is under another script
end)
---Some code -- This code will be executed
--Infinite Loop2 -- The script will run this.