You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? The remote event to work properly.
What is the issue? It just doesn’t fire the function inside the remote event script…
The remote event is parented under a script that is inside ServerScriptService.
What solutions have you tried so far? Yeah, I searched on the devforums and I found that I should use :WaitForChild() whenever I define the remote event but I did that already.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
Here’s where the remote event gets fired:
elseif string.match(msg, "!announce") and table.find(AnnouncementWhitelist, plr.UserId) then
print("Chatted !announce")
GUIVisibility:FireClient(plr)
end
It prints it out so it’s obviously detecting the player chatted “!announce”.
You can parent the RemoteEvent anywhere it can be accessed by the client like ReplicatedStorage.
Also, put the local script inside the StarterPlayerScripts container.
But the remote event has to be fired by a server script and I don’t think a server script can access ReplicatedStorage (Also I just realized, RemoteEvents aren’t supposed to be in RS or SSS so I should put the event with the script into ServerStorage and it’ll work)
nevermind it doesn’t work
Thats wrong, they can be in ReplicatedStorage and that is the main container for anything that requires communication between the server and the client.
ServerStorage is a container for anything that isn’t related (directly) to the clients (clients aren’t allowed to access or see it).
Bro server scripts can access anywhere, put your RemoteEvent into the ReplicatedStorage and the local script into the StarterPlayerScripts. That will fix it. ReplicatedStorage is literally how the client communicates with the server
It appears you are uninformed, the Server in ServerScriptService stems from the fact that its descendants are not replicated to the Client(s). The Replicated in ReplicatedStorage is because its contents are replicated to both the Server and Client(s)
ReplicatedStorage is actually a common location for RemoteEvents to be kept.
Thank you all, I guess I was misinformed and I had a little confusion with remote events. I put the local script in StarterPlayerScripts and kept the remote event inside ReplicatedStorage and it worked. I’ll mark @wf_sh post as solved because he explained the most.