generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Help on player joining problems.

Previous Thread :: Next Thread 
StickMasterNinja2 is not online. StickMasterNinja2
Joined: 18 May 2013
Total Posts: 1170
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
FrontPocket is not online. FrontPocket
Joined: 27 Apr 2014
Total Posts: 278
30 Sep 2015 01:24 PM
You haven't even told us the problem.
Report Abuse
StickMasterNinja2 is not online. StickMasterNinja2
Joined: 18 May 2013
Total Posts: 1170
30 Sep 2015 01:26 PM
The Gui isn't going to the player gui after a player joined.
Report Abuse
secret6timb1 is not online. secret6timb1
Joined: 11 Sep 2013
Total Posts: 1817
30 Sep 2015 01:42 PM
is weapongui a screengui or a frame?
Report Abuse
StickMasterNinja2 is not online. StickMasterNinja2
Joined: 18 May 2013
Total Posts: 1170
30 Sep 2015 04:11 PM
A screen gui.
Report Abuse
StickMasterNinja2 is not online. StickMasterNinja2
Joined: 18 May 2013
Total Posts: 1170
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
StickMasterNinja2 is not online. StickMasterNinja2
Joined: 18 May 2013
Total Posts: 1170
30 Sep 2015 04:41 PM
Bump.
Report Abuse
StickMasterNinja2 is not online. StickMasterNinja2
Joined: 18 May 2013
Total Posts: 1170
30 Sep 2015 05:20 PM
Bump 2.
Report Abuse
Vescule is not online. 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
StickMasterNinja2 is not online. StickMasterNinja2
Joined: 18 May 2013
Total Posts: 1170
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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image