Remote wont fire for some reason

  1. One local script in a submit button, a remote event and a script to recieve the event.

  2. The script won’t recieve the event or the local script wont fire it.

Local Script

	if script.Parent.Parent.TextBox.Text ~= nil then
			script.Parent.RemoteEvent:FireServer(script.Parent.Parent.ScrollingFrame.Value.Value, script.Parent.Parent.TextBox.Text)

			script.Parent.Parent.Visible = false

Server Script




1 Like

Can you resend your serverside code please.

script.Parent.RemoteEvent.OnServerEvent:Connect(function(player, medicine, dose)


Ok, for your client script is this line printing? :


And is your severside printing “test”?

No my server side is not printing test

Personally, I’d just put the RemoteEvent inside ReplicatedStorage as there are just some places that these objects can’t function right on

-- Client Side
local Event = game.ReplicatedStorage:WaitForChild("RemoteEvent")
local Button = script.Parent
local ScrollingFrame = Button.Parent.ScrollingFrame

    if Button.Parent.TextBox.Text ~= nil then
        Event:FireServer(ScrollingFrame.Value.Value, Button.Parent.TextBox.Text)
--Server Side (Preferably inside ServerScriptService)
local Event = game.ReplicatedStorage:WaitForChild("RemoteEvent")

Event.OnServerEvent:Connect(function(Plr, Medicine, Dose)
    print(Plr, Medicine, Dose)

You might need to place your remote event into Replicated Storage. I’m not sure what your hierarchy is, but it is possible that one of the scripts isn’t able to see it because of its placement. Try that and see if it helps!

First off all, place the remote event in ReplicatedStorage, the server-sided script cannot fire a remote event which is inside player

Second, only you can keep bindable events in player, never keep remote events in player, always keep in replicated storage or workspace

Third, run a print function at end and start of the remote event firing function, if both of them are printed, then no error, if it did not print then use a pcall function and print the error

Four, scripts never work on player, don’t even keep a script inside player, you did that

Read all the above lines, they fix your issue

im having a similar issue to this. i scripted a GUI that will move a folder inside a players backpack, and i filled it with test scripts (server sided)

could this be the reason why it doesnt work?

Yes, that’s probably why I totally forgot server scripts don’t work in a player

1 Like

Yes, thats the reason, the local scripts run on client-side, meaning they can read client-sided data like time, os date and more

But if you use server-sided, it basically is on client-side, but it cannot read client-side, so it does not work

Imagine a train can go on a track, but cannot go in water

Just like that a local script can work on a client, not on server, and script on server not on client

It don’t matter where the event is parented excluding the server, it will function either way, what he has done is some other issue

Don’t you know how remote event works? In the DevHub API they clearly told, remote events should be kept where both server and client can access, server cannot access client-internal data

Do not post false posts, if your not sure, just telling because you know that would make the OP angry and the person your replying to a misleading post

Putting my last note over here, I said excluding the server, meaning putting the event inside a gui I don’t see a problem with that (Because the client and server can access it), it’s only a problem when you parent the gui through client

What you are saying is that server do not have access to GUI’s? mousebutton1click works both client and server

Sorry for the off-topic interruption

Still not working after putting script in serverscript service and remoteevent in replicatedstorage

Show me both your scripts, local and server script