I’m trying to do an “Detect System” when a player clicks a UI button it clones an billboard gui with frame in it from workspace in to other players and only the player that clicked the UI button will see the billboard gui in other players. I tried searching and I couldn’t find anything.
I also have an folder in workspace that if the round starts the player will be parented to the folder.
The script:
local players = game.Workspace.GameSystem.PlayersInGame.Survivor
local Button = script.Parent
local Used = false
Button.MouseButton1Click:Connect(function()
if Used == false then
for i, plrs in ipairs(players:GetChildren()) do
if plrs.Name ~= game.Players.LocalPlayer.Name then
Used = true
local particles2 = Instance.new("BillboardGui")
particles2.Size = UDim2.new(6,0,6,0) --[The Size You Want Your BillBoard To Be]--
particles2.AlwaysOnTop = true
local particles = workspace.BillboardGui.ImageLabel:Clone()
particles.Parent = particles2
particles2.Parent = plrs.UpperTorso
wait(10)
particles2:Destroy()
wait(120)
Used = false
end
end
end
end)
local player = game.Players:GetChildren()
local Button = script.Parent
Button.MouseButton1Click:Connect(function()
for i, plrs in ipairs(player) do
if plrs.Name ~= game.Players.LocalPlayer.Name then
local particles2 = Instance.new("BillBoardGui")
particles2.Size = UDim2.new() --[The Size You Want Your BillBoard To Be]--
particles2.AlwaysOnTop = true
local particles = workspace.BillBoardGui.ImageLabel:Clone()
particles.ImageTransparency = 1
particles.Parent = particles2
particles2.Parent = plrs.Character.Head
local ts = game:GetService("TweenService")
local ti = TweenInfo.new(
5, --Time--
Enum.EasingStyle.Linear, --Easing Style--
Enum.EasingDirection.Out, --EasingDirection--
0, --Repeat Count--
false --Repeats?--
)
local t = ts:Create(particles, ti, {ImageTransparency = 0})
t:Play()
end
end
No that’s not what I want to do, I want to copy billboard gui from workspace to all other players in the In-Game folder if the button is clicked, and the player that clicked the button can only see the billboard gui.
It works but it only copies the billboard gui in to only 1 player and not all the players.
I customized the script:
local player = game.Workspace.GameSystem.PlayersInGame.Survivor
local Button = script.Parent
local Used = false
Button.MouseButton1Click:Connect(function()
if Used == false then
for i, plrs in ipairs(player:GetChildren()) do
if plrs.Name ~= game.Players.LocalPlayer.Name then
Used = true
local particles2 = Instance.new("BillboardGui")
particles2.Size = UDim2.new(6,0,6,0) --[The Size You Want Your BillBoard To Be]--
particles2.AlwaysOnTop = true
local particles = workspace.BillboardGui.ImageLabel:Clone()
particles.Parent = particles2
particles2.Parent = plrs.UpperTorso
wait(10)
particles2:Destroy()
wait(120)
Used = false
end
end
end
end)
I want the billboard gui to be created inside all players not just 1, the script that you send me creates the billboard gui in only 1 player and not all the players.