-
Main Achievement
When a boss dies, it gives every player a GUI -
The Problem
The gui is only given to the last player who joins -
Attempted solutions
Using tables (but the boss is in replicated storage so it doesnt count players when they join)
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
Code:
--// Variables
local Humanoid = script.Parent.Parent:FindFirstChildOfClass("Humanoid")
local BossGui = game:GetService("ReplicatedStorage").BossText:FindFirstChild(script.BossGui.Value):Clone()
--// Getting Player
spawn(function()
while true do
wait()
for i, v in pairs(game.Players:GetChildren()) do
Player = v
end
end
end)
--// Appear
Humanoid.Died:Connect(function()
BossGui.Parent = Player.PlayerGui
end)
Thanks for any help, it’s highly appreciated!