So I started working on this game, where there is a wage the Mayor can change, it’s similar to Generic Roleplay Gaem, except it is a town. I can’t get the wage the Mayor inputs locally to the server, I have tried everything including RemoteEvents.
Here is what the code looks like:
Local:
local event = game.ReplicatedStorage.WageChange
local wage = script.Parent.Value
event:FireServer(wage)
Server:
local remoteevent = game.ReplicatedStorage.WageChange
remoteevent.OnServerEvent:Connect(function(wage)
script.Parent.Value = wage
end)
local wage = script.Parent --no .Value!(it makes it constant)
function Changed(value)
event:FireServer(value)
end
Changed(wage.Value)
wage.Changed:Connect(Changed)
Where should the event be? I tried this as well just now, It didn’t work. I got no errors or anything, I tried print() debugging, and it sent a print from your script the second the game starts, no other time. The server wasn’t printing. So for some reason it is not going from the client to the server.