I have a localscript in my tool that is supposed to activate a server script but I feel like I need to make the server script local or something...can somebody explain how to make a script for filtering enabled games and tell me the differences between how I should script it and where? and can variables from the local script be read by the server script?
✓ ANSWER ACCEPTED
how do you make a local script in a tool activate a server script in serverscriptservice?
1 answer
✓ Accepted answer
You need to use remote events. Remote events are used for communication between the client and the server, and FE doesn't affect them. If you post your current scripts I can help you more. Here's an example of how you would make a local script activate a server script with a local script.
--local script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Event= ReplicatedStorage:WaitForChild("RemoteEvent")
Event:FireServer()
--server script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Event= Instance.new("RemoteEvent", ReplicatedStorage)
Event.Name = "Event"
local function EventFired()
--whatever it is here
end
Event.OnServerEvent:Connect(EventFired)
Go here for information on remote events. Variables can't be read, but you can create values(like string or int values) or put parameters in the firing.
1 comment
0
Thank you so much!
This discussion is preserved as it was. New answers, comments, and votes are closed.

5 comments
I think you're able to use normal scripts in a tool. Have you attempted that? Also, nice username.
lol thanks and i will try that
"server script local", so your saying that you can make a local script server?
You can have localscripts and regular scripts inside a tool. To have them interact with each other, use remotes.
Use RemoteEvents and RemoteFunctions.