Did you try using print() before firing the remote event to check if that part of the script is actually running?
If not, try that.
If it’s running and still not working, make sure your using the correct way.
On the server script there should be something like this:
RemoteEvent.OnServerEvent:Connect(function()
– your code here
end)
I tried with print and the server receives the information when I click on the button. The problem is that when I put the FireServer() the localscript crashes.
My goal is just to make a button and when you click on it the number of agents you have goes down like $100, -$5 goes away. I need to do a remote event to signal the server that the value is changing. But the problem is that roblox never works, there is always a problem and it annoys me, when you solve one, another problem comes.
You mean like if you click a button, your money just decreases by 5?
Local Script: (In starter player)
local GUI = script.Parent – change this to your button
local RemoteEvent = game.ReplicatedStorage.RemoteEvent – you should probably rename the remote event
GUI.Activated:Connect(function()
RemoteEvent:FireServer()
end)
Server Script (In server script service)
local RemoteEvent = game.ReplicatedStorage.RemoteEvent