hi i have my number values in client script
the number values are live counts for seats if the seat count is 0 it does not let the plr check in. but im worried about the client changing the number value how can i prevent this?
hi i have my number values in client script
the number values are live counts for seats if the seat count is 0 it does not let the plr check in. but im worried about the client changing the number value how can i prevent this?
keep the seat count on the server
cant it is suppose to be replicated
im using fire all clients
-- client
res.ChangeCount:FireServer("eco")
res.ChangeCount.OnClientEvent:Connect(function(class)
if class == "ECO" then
livevalue.ECO.Value = livevalue.ECO.Value - 1
elseif class == "BC" then
livevalue.BC.Value = livevalue.BC.Value - 1
elseif class == "FC" then
livevalue.FC.Value = livevalue.FC.Value - 1
end
end)
-- server
res.ChangeCount.OnServerEvent:Connect(function(plr,class)
res.ChangeCount:FireAllClients(class)
end)
if you are doing checks on the server you should be fine. Also you can just use a remotefunction instead of firing the remote event twice. Client send server the class, the server check if there are still seats left, if yes then client can join, if not then nothing
well but then it returns as nill because the value counts are only on the client
server doesnt recognize the changes
why are you keeping track of seats on the client?
actually yeah im asking myself the same question
thank you very much for the idea i switched my system to server