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

What is a good way to use bindable events in an FE game?

So i watched AlvinBLOX's tutorial on bindable events, and he said bindable events allow for 2 scripts of the same kind (script with script. localscript with localscript) to "communicate" with each other. Now my question is if you can write it like this:

wait(3)

game.Workspace.Baseplate.BrickColor = BrickColor.new("Really Red")

instead of this:

local bindableevent = game.Workspace:WaitForChild("BindableEvent")

wait(3)

bindableevent:Fire

(this part is in another script)

local bindableevent = game.Workspace:WaitForChild("BindableEvent")

bindableevent.Event:Connect(function()

	game.Workspace.Baseplate.BrickColor = BrickColor.new("Really Red")

end)

then why would you use bindable events?

1 answer

✓ Accepted answer

Let's say you have a script that manages your player data, and you can only increase/decrease the player's current currency through that script. Whenever an outside script would want to increase/decrease the currency, you'd use a bindable event. Basically you use bindable events whenever you want to do something a script can but from a script that can't. There are also better examples but I can't think of any because I'm dumb.

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