Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How do I create a script that always runs, without lagging the server?

Asked by
RoboFrog 400 Moderation Voter
10 years ago

The title states all. I'm trying to find out how to make a script always run (and by that, always check an IntValue in realtime to see if it changes)

1 answer

Log in to vote
1
Answered by
Nifer2 174
10 years ago

You can make a script that runs every time the IntValue changes.

local IV = script.Parent.IntValue -- You can change this. Just write the IntValue's location.

function blah()
    -- Write code here.
end

IV.Changed:connect(blah) -- Activates when the IntValue changes.

If you just write it like that, then it should work.

Ad

Answer this question