This is my script. It is part of a revolutionary new checkout system that will be put into my new store game that will be part of my store group. What it is supposed to do is this: When "Yes" is clicked on a GUI, the StringValue in the Workspace (WorkerValue) becomes the name of the player who clicked it. However, it will not do so if a BoolValue in the Workspace equals true because that would mean that there is already someone working at that register. It does not work. There are no output errors, it plain old doesn't work. Why? Here is the script:
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Visible = false
if game.Workspace.Value == true then
script.Parent.Parent.Visible = true
elseif game.Workspace.Value == false then
for _, Player in pairs(game.Players:GetPlayers()) do
game.Workspace.Value = true
game.Workspace.WorkerValue = Player.Name
end
end
end)

1 comment
Wow. I don't know how I made such an amazingly amateur error, but thanks for catching it!