Well, you can try it. It’s a server script after all and there are no remote events. Here’s what I did and it worked!
local RS = game:GetService("ReplicatedStorage")
local UI_tag = RS:FindFirstChild("UI")
local VotingTime = RS:FindFirstChild("VotingTime")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
UI_tag:Clone().Parent = character.Head
player.PlayerGui.UI.Adornee = character.Head
VotingTime.Changed:Connect(function()
if VotingTime.Value == true then
for _, v in ipairs(game.Players:GetChildren()) do
if v:IsA("Player") and v ~= nil then
local playerGui = v.PlayerGui
playerGui.UI.Main.Visible = true -- Reference your UI.
end
end
else
for _, v in ipairs(game.Players:GetChildren()) do
if v:IsA("Player") and v ~= nil then
local playerGui = v.PlayerGui
playerGui.UI.Main.Visible = false -- Reference your UI.
end
end
end
end)
end)
end)
local RS = game:GetService("ReplicatedStorage")
local UI = RS:FindFirstChild("UI")
local VotingTime = RS:FindFirstChild("VotingTime")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
UI:Clone().Parent = player.PlayerGui
player.PlayerGui.UI.Adornee = character.Head
while wait() do
if VotingTime.Value == true then
for _, v in ipairs(game.Players:GetChildren()) do
if v:IsA("Player") and v ~= nil then
local playerGui = v.PlayerGui
playerGui.UI.Main.Visible = true -- Reference your UI.
end
end
else
for _, v in ipairs(game.Players:GetChildren()) do
if v:IsA("Player") and v ~= nil then
local playerGui = v.PlayerGui
playerGui.UI.Main.Visible = false -- Reference your UI.
end
end
end
end
end)
end)
local RS = game:GetService("ReplicatedStorage")
local UI_tag = RS:FindFirstChild("UI")
local VotingTime = RS:FindFirstChild("VotingTime")
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
UI_tag:Clone().Parent = character.Head
character.Head.UI.Adornee = character.Head
VotingTime.Changed:Connect(function()
if VotingTime.Value == true then
for _, v in ipairs(game.Players:GetChildren()) do
if v:IsA("Player") and v ~= nil then
local playerGui = v.Character.Head.UI
playerGui.Main.Visible = true -- Reference your UI.
end
end
else
for _, v in ipairs(game.Players:GetChildren()) do
if v:IsA("Player") and v ~= nil then
local playerGui = v.Character.Head.UI
playerGui.Main.Visible = false -- Reference your UI.
end
end
end
end)
end)
end)
I don’t want exploiters being able to view anybody’s BillboardGui through the character because later on I’m going to be relying on them as a voting system with a little number off to the side.
Furthermore, if the bug stated above is true, I don’t want an exploiter deleting their BillboardGui, ultimately giving them the benefit of not allowing players to see their suspicion meter.
EDIT: Ultimately I’ve settled on putting the BillboardGui inside the Head of the player. I’ll just have to come up with ways on how I can counter this if the Client somehow deletes the UI.