Hey there.
We all know scripting, right? Yes.
I have a question about LUA.
We all know you can just do
game.ReplicatedStorage.RemoteEvent:FireClient(player)
print('yes we fired lol')
But is there a way to shorten that just like in JavaScript?
JavaScript example:
guild.delete().then(g => console.log(`Deleted the guild ${g}`))
But would there be a way for roblox to also do that?
Example:
game.ReplicatedStorage.RemoteEvent:FireClient(player).then(print("yes"))
Just curious of this, thanks.
1 Like
Xacima
(Xacima)
#2
This is not possible when it comes to RemoteEvents.
But, with functions (and more), you can do this:
local function Print()
return 1
end
if Print() == 1 then
print('yes')
end
Ah okay. Thanks.
I was just curious of that because I thought if you could do .then(print(“blahblah”)) that would make scripting a bit easier lol
Xacima
(Xacima)
#4
An if statement isn’t really that difficult to understand though, it just works in another way depending on the language you’re using.
1 Like