Hi! So, around 2 hours ago, I made a question asking if I can use events as if statements. Well I wasn't very informative about what I meant so I remade this question again but with more information regarding my question.
So, I have a game that has stages and my remote functions cannot really catch the stage that the player is in changing. And since Stage is a value of Leaderstats. I know i can use an event named Changed. But I already kind of have a remote function that I do not want to ruin. I only want the event activating when necessary. And not stopping the entire script until it activates.
So, Do I use Changed:Wait? Like this?
local stage = player.leaderstats.Stage.Value
remoteFunction.OnServerInvoke = function()
if stage.Changed:Wait() then
-- do code
else
-- do code
end
end
Or do I use it as an If statement? Like this:
local stage = player.leaderstats.Stage.Value
remoteFunction.OnServerInvoke = function()
if stage.Changed then
--do code
else
-- do code

1 comment
In the second script i think its valid