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

Can i use events as if statements?

Asked by 3 years ago

Hi! So I'm creating my game and the game doesn't detect whenever the stage the player is in changes. So, I wanna know if I can use the Changed event as an if statement like for example

local specifiedStage = -- Source Code Can't Leak it

if specifiedStage.Changed then
-- Do coding
end

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

You can try this:

local specifiedStage = --your source code

specifiedStage.Changed:Connect(function(changed)
    --Do code
end)

This will make it so whenever the value is changed, it will run the function.

0
Well thing is i already have events and im not sure if nesting events will be good Baselistic 103 — 3y
Ad

Answer this question