Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can i use events as if statements?

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

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.

1 comment

0

Well thing is i already have events and im not sure if nesting events will be good

This discussion is preserved as it was. New answers, comments, and votes are closed.