Remote event not firing

I am just about done with my game so I decided to move my game from my profile to my group so that it will be easier to pay commissions with group funds and it will have a newer created date. Since I moved everything over everything works fine except for one remote event.

It makes no sense because it still works perfectly fine in the place on my profile. All the other remote events in the game work fine. It is literally just this one remote event that doesn’t work. What the script is trying to accomplish is it is a local script inside of playerGUI. It is inside of a menu to buy power ups. So when a player clicks it, it is supposed to then check the server to see if the player has enough coins and if they do it will give them the power up.

–Client Sided

button.MouseButton1Click:Connect(function()
	if PlayingAnim.Value == false then
		PlayingAnim.Value = true
        print("Bought")
		SubCoins:FireServer(price, power)
	end
end)

–Server script

SubCoins.OnServerEvent:Connect(function(player, price, power)
	print("Server Bought")
end)

output only prints “Bought”

Where did you put the remote event SubCoins? I believe it has to go in ReplicatedStorage.

Yes it is in replicated storage along with all of my other remote events

try mousrbutton1down

  1. Insert a print(“end”) after the :FireServer() function and see if it prints
  2. Check for errors both server and client side by using the output window (you can find It in view tab).

Also i hope your not doing operations with the passed price as cheaters can easly call the event with the values they want to.

Once the event fires the server checks if the player has the coins server sided. I checked if it still prints after it is supposed to fire and it does so I think for some reason the server isn’t receiving it.

I was thinking the same, have you checked if SubCoins is well declared server side? It should be something like:

game:GetService("ReplicatedStorage"):WaitForChild("SubCoins")

Talking about the money check, you should pass the name of the product (which is “Power” i guess) instead and check the value of It from the server, then check the player currency, cuz if someone (cheater) fires the event with 0 as the price… that guy will get the item for free

1 Like

in which service is your server script (scripts wont run in ReplicatedStorage)

1 Like

It is declared exactly like that server sided. Also the money check is already set up exactly the way you said.

it is in server script service. Everything else in the script works fine

Are there any other events with the same name? Even if not, have you tried changing the name of the event?

Try making the remote event have no parameters ?

does the print(“Bought”) work? and make sure to check the BoolValue if it is set to false PlayingAnim.Value == false

You are absolutely certain that SubCoins is the same remote event in both scripts? Double check, cause it could be causing this issue

You should put a print before the connection, to see if the server script is even getting to that code. That is the only possible reason this code isn’t working.