Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Value doesn't change client/server side?

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.

1 answer

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)

1 comment

0

It continues to do the same thing. Everything is valid but the value doesn't change client and server side for whatever reason. Thanks anyway.

This discussion is preserved as it was. New answers, comments, and votes are closed.