Long story short,
I’m making a game in 24 hours for the sake of my fun. I really don’t know how or when I should use my remote events and bindable events. The server takes the event’s name into an argument. Then it runs a function by the event name.
- I use one remote event and one bindable event
Good Example Code
local Event = Instance.new("BindableEvent",workspace) script.Name = 'ExampleEventSystem' Event.Event:Connect(function(EventName) if EventName == 'Hotdog' then print('Hotdogs are disgusting with bread') elseif EventName == 'Pizza' then print('Pizza is disgusting with bread') elseif EventName == nil then print('nil is disgusting with bread') end end) wait(1) Event:Fire(nil) Event:Fire(nil) Event:Fire('Pizza') Event:Fire('Hotdog') -- Server Script Please
Example Code Output
nil is disgusting with bread (x2) Pizza is disgusting with bread Hotdogs are disgusting with bread
Any feedback or helpful tips are appreciated
Edit : I know how to use bindables and remotes. I’m asking if I should use only one of each or not. Check the examples.