1 | game.Players.PlayerAdded:Connect( function (plr) |
2 | local CloneMe = game.ServerStorage.ClassLoadout:Clone() |
3 | CloneMe.Parent = plr.PlayerGui |
4 | end ) |
how do I make it when a player die it clone the gui
Hi bro,
1 | game.Players.PlayerAdded:Connect( function (plr) |
2 | plr.CharacterRemoving:Connect( function () |
3 | local CloneMe = game.ServerStorage.ClassLoadout:Clone() |
4 | CloneMe.Parent = plr.PlayerGui |
5 | end ) end ) |
try this.
Hello dude, here this might be what you're looking for!
(It's a localscript which you should put in StarterGui)
1 | local Player = game:GetService( "Players" ).LocalPlayer |
2 | local character = Player.Character or Player.CharacterAdded:Wait() |
3 |
4 | wait( 0.25 ) |
5 |
6 | character [ "Humanoid" ] .Died:Connect( function () |
7 | local CloneMe = game.ServerStorage.ClassLoadout:Clone() |
8 | CloneMe.Parent = plr.PlayerGui |
9 | end ) |
This is probably not what you're looking for, but if you mean like when the player dies, the GUI doesn't disappear, go into the ScreenGUI's properties and turn ResetOnSpawn off.