Search the Community
Showing results for tags 'remoteevent'.
Found 1 result
Hello! I realized that remote events are hard for some people, and I wanted to clear the air that remote events are pretty easy! What are remote events? Games with Filtering Enabled, don't have access to a lot of things on the client side, so we have to use remote events to tell the server when to do something, like change a name of a text button! If you want more information, try checking out ROBLOX's article here First, let's create a remote event in replicated storage: Now, let's create a local script, and put it in StarterGui: In this script, you would usually put things before it, like loading client information, but we will keep it simple. print("OurEvent is about to fire!") game.ReplicatedStorage.OurEvent:FireServer() print("OurEvent has has fired!") What this does is when we say "game.ReplicatedStorage.OurEvent:FireServer()" we say "Hey, we would like our RemoteEvent to run that's in replicated storage." Let's create another script, but this time, a regular script in ServerScriptService: Now, in this script, ask the server to tell us when we fired our event. game.ReplicatedStorage.OurEvent.OnServerEvent:connect(function() -- put code to do after the event has fired end) I hope this improved your knowledge on RemoteEvents, these are the very basics, but I hope you learned something new!