Hello, I can currently Making a map voting system and I’m having trouble with it, when u vote on a map it sends a remote event to a sever script and they sever script sends another Remote event to fire all clients and Change the Vote value, I need it to only change the Map that’s been voted value, any help?
click vote script
local Remote = game.ReplicatedStorage.Vote.Voted
script.Parent.MouseButton1Click:Connect(function()
local CanClick = script.Parent.Parent.CanClick.Value
if CanClick == true then
local Map1 = script.Parent.Parent.CanClick
script.Parent.Parent.CanClick.Value = false
Remote:FireServer(Map1)
script.Parent.Parent.Parent["Map 2"].CanClick.Value = true
script.Parent.Parent.Parent["Map 3"].CanClick.Value = true
else
if CanClick == false then
end
end
end)
server script
local Remote = game.ReplicatedStorage.Vote.Voted
local Remote1 = game.ReplicatedStorage.Vote.ChangNumber
Remote.OnServerEvent:Connect(function(Map1, Map2, Map3)
Remote1:FireAllClients()
end)
script that changes voting value
local Remote1 = game.ReplicatedStorage.Vote.ChangNumber
Remote1.OnClientEvent:Connect(function()
script.Parent.Value = script.Parent.Value + 1
end)