It seems you have not understood the definition of Remote Events.
What are Remote Events?
Remote Events are a Roblox Instance which allows the Server Script to communicate with a Local Script. Not Server Script to Server Script or Local Script to Local Script.
In your scenario, you attempted on communicating Server Script with another Server Script. I am stating this because that is what you showed in your GIF. The call is never invoked. Thus, it does not error, nor does any of it print.
So. What is the Solution?
What are Bindable Events?.
Bindable Events are also Roblox Instances with its function similar to of Remote Events except, it only communicates with the same type i.e Server Script to Server Script and Local Script to Local Script.
Now I cannot exactly use your code but take a look at my example.
Server Script 1
local Baseplate = workspace.Baseplate;
local Click = Baseplate.ClickDetector;
local BindableEvent = workspace.Event;
local Zafs_Str = "Brrrrrr";
local function On_Click ()
BindableEvent:Fire(Zafs_Str);
end;
Click.MouseClick:Connect(On_Click);
Server Script 2
local BindableEvent = workspace.Event;
local function Print_When_Invoked (str)
print(str);
end;
BindableEvent.Event:Connect(Print_When_Invoked);
Resources to Learn.
4 comments
Is this a server script or local?
For events, :connect is actually deprecated and isn't recommended, try changing it to :Connect instead.
@YabaDadaD0O using
:connect()won't make the script not work.Make sure to accept the answer if it helped you.