This script is a normal script inside the server script service. The value I am trying to change is inside the player. (player service object)
--p is the player object inside the player service, not the player name. VoteEvent.OnServerEvent:Connect(function(p)--When the vote event that comes from the client with the player object(p) local Players = game:GetService("Players") local VotedValue = p:WaitForChild("Voted") VotedValue.Value = true--No error but the value stays the same. end)
thanks.
VoteEvent.OnServerEvent:Connect(function(p) local success, errormessage = pcall(function() local Players = game.Players local VotedValue = p:WaitForChild("Voted") VotedValue.Value = true end) if not success then warn(errormessage) --prints what is the problem, if there's a problem end end)