|
| 30 Sep 2015 01:20 PM |
game.Players.PlayerAdded:connect(function(player) repeat wait() until player local weapons = script.Parent.WeaponGui:Clone() weapons.Parent = player.PlayerGui end) |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2015 01:24 PM |
| You haven't even told us the problem. |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2015 01:26 PM |
| The Gui isn't going to the player gui after a player joined. |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2015 01:42 PM |
| is weapongui a screengui or a frame? |
|
|
| Report Abuse |
|
|
| |
|
|
| 30 Sep 2015 04:12 PM |
local player = game.Players.LocalPlayer repeat wait() until player local character = (player.Character or player.CharacterAdded:wait())
game.Players.PlayerAdded:connect(function(player) repeat wait() until player local weapons = script.Parent.WeaponGui:Clone() weapons.Parent = player.PlayerGui end)
local deathMessages = { "Don't quit, please!", "Shrekt!", "Relax.", "Game over.", "Did you remove your hats?", "Keep practicing.", "Try again.", "You died." }
character:WaitForChild("Humanoid").Died:connect(function() local screen = Instance.new("ScreenGui", player.PlayerGui) screen.Name = "DeathScreen" local frame = Instance.new("Frame",screen) frame.BackgroundColor3 = Color3.new(255/255, 0, 0) frame.BackgroundTransparency = 0.5 frame.BorderSizePixel = 0 frame.Size = UDim2.new(1, 0, 1, 0) local label = Instance.new("TextLabel", frame) label.BackgroundTransparency = 1 label.Size = UDim2.new(1, 0, 1, 0) label.Font = "Legacy" label.TextColor3 = Color3.new(255/255, 255/255, 255/255) label.TextScaled = true local msgg = deathMessages[math.random(#deathMessages)] label.Text = msgg end)
Better? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
Vescule
|
  |
| Joined: 23 Jan 2014 |
| Total Posts: 72 |
|
|
| 30 Sep 2015 05:26 PM |
Make it wait until the players PlayerGui loads.
game.Players.LocalPlayer:WaitForChild("PlayerGui")
=== VESCULE | SCRIPTER | BUILDER === |
|
|
| Report Abuse |
|
|
|
| 30 Sep 2015 07:19 PM |
local player = game.Players.LocalPlayer repeat wait() until player local character = (player.Character or player.CharacterAdded:wait())
game.Players.PlayerAdded:connect(function(player) local weapons = script.Parent.WeaponGui:Clone() weapons.Parent = player:WaitForChild("PlayerGui") end)
local deathMessages = { "Don't quit, please!", "Shrekt!", "Relax.", "Game over.", "Did you remove your hats?", "Keep practicing.", "Try again.", "You died." }
character:WaitForChild("Humanoid").Died:connect(function() local screen = Instance.new("ScreenGui", player.PlayerGui) screen.Name = "DeathScreen" local frame = Instance.new("Frame",screen) frame.BackgroundColor3 = Color3.new(255/255, 0, 0) frame.BackgroundTransparency = 0.5 frame.BorderSizePixel = 0 frame.Size = UDim2.new(1, 0, 1, 0) local label = Instance.new("TextLabel", frame) label.BackgroundTransparency = 1 label.Size = UDim2.new(1, 0, 1, 0) label.Font = "Legacy" label.TextColor3 = Color3.new(255/255, 255/255, 255/255) label.TextScaled = true local msgg = deathMessages[math.random(#deathMessages)] label.Text = msgg end)
I tried. :( |
|
|
| Report Abuse |
|
|
Vescule
|
  |
| Joined: 23 Jan 2014 |
| Total Posts: 72 |
|
|
| 30 Sep 2015 07:34 PM |
No, put what I said at the very beginning of the script.
=== VESCULE | SCRIPTER | BUILDER === |
|
|
| Report Abuse |
|
|