I'm trying to make a scoreboard, and even though I tried to tell the server that a specific boolean value was true, I printed to check the value and it returned as false. When I tried printing the DetermineValue, it printed my ROBLOX name, (FriendBandsX) instead of showing true or false.. maybe I used the wrong thing. I just don't know how to utilize the data that I'm sending to the server and I'm confused.
Server-side on top, client on bottom
-- GUI Variables
local GroupID = 3625788
local MinimumRankRequired = 1
local DeleteGUI = game.ReplicatedStorage.DeleteGUI
-- Remotes
local DataHold = game.ReplicatedStorage.DataHolder
local F = game.ReplicatedStorage.F
-- Away Variables
local AwayScore = game.Workspace.Scoreboard.MainGUI.MainFrame.Scores.AwayScore.Runs
local HomeScore = game.Workspace.Scoreboard.MainGUI.MainFrame.Scores.HomeScore.Runs
local descendants = game.ReplicatedStorage.F:GetDescendants()
-- Functions
local function HandleRemotes(DetermineValue)
for i, descendant in pairs(descendants) do
if descendant:IsA("BoolValue") then
print(descendant.Value)
if descendant.Name == "AddingAwayRuns" and descendant.Value == true then
AwayScore.Value = AwayScore.Value + 1
AwayScore.Parent.Text = AwayScore.Value
elseif descendant.Name == "AddingHomeRuns" and descendant.Value == true then
HomeScore.Value = HomeScore.Value + 1
HomeScore.Parent.Text = HomeScore.Value
end
end
end
end
DataHold.OnServerEvent:Connect(HandleRemotes)
Client-side:
-- Remotes
local DataHold = game.ReplicatedStorage.DataHolder
local F = game.ReplicatedStorage.F
script.Parent.MouseButton1Click:Connect(function()
DataHold:FireServer(F.AddingAwayRuns.Value == true)
end)
