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 » Scripting Helpers
Home Search
 

Re: Most simple script error

Previous Thread :: Next Thread 
Xheng is not online. Xheng
Joined: 28 Apr 2013
Total Posts: 158
19 May 2013 08:21 AM
function entered(plr)
p = Instance.new("Hint", plr.PlayerGui)
p.Text = "Hello".. plr.Name
end

game.Players.PlayerAdded:connect(entered)
Report Abuse
Xheng is not online. Xheng
Joined: 28 Apr 2013
Total Posts: 158
19 May 2013 08:24 AM
Output: PlayerGui is not a valid member of Player
Report Abuse
ROBLOXTHEMOVIEs is not online. ROBLOXTHEMOVIEs
Joined: 11 Jun 2012
Total Posts: 5895
19 May 2013 08:26 AM
lolwut?
try this
function entered(plr)
p = Instance.new("Hint", plr.Workspace)
p.Text = "Hello".. plr.Name
end

game.Players.PlayerAdded:connect(entered)

~My mom said I can be anything, So I became a CLOWN~
Report Abuse
Xheng is not online. Xheng
Joined: 28 Apr 2013
Total Posts: 158
19 May 2013 08:27 AM
Workspace isn't a member of the player...
Report Abuse
toadjesse is not online. toadjesse
Joined: 03 Jun 2008
Total Posts: 5617
19 May 2013 08:28 AM
Xheng the player is Players or Player1 ?
Report Abuse
Xheng is not online. Xheng
Joined: 28 Apr 2013
Total Posts: 158
19 May 2013 08:29 AM
I have no clue but it only said Player no s or Player1 the default test character.
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
19 May 2013 08:30 AM
It's the player that joined.

Use this:

game.Players.PlayerAdded:connect(
function(plr)
if not plr:FindFirstChild("PlayerGui") then repeat wait() until plr:FindFirstChild("PlayerGui") end
local h = Instance.new("Hint", plr.PlayerGui)
h.Text = "Hello, "..plr.Name
game.Debris:AddItem(h, 5)
end)
Report Abuse
Xnite515 is not online. Xnite515
Joined: 18 Feb 2011
Total Posts: 22763
19 May 2013 08:31 AM
function entered(plr)
wait()
p = Instance.new("Hint", plr.PlayerGui)
p.Text = "Hello".. plr.Name
end

game.Players.PlayerAdded:connect(entered)
Report Abuse
Xheng is not online. Xheng
Joined: 28 Apr 2013
Total Posts: 158
19 May 2013 08:33 AM
They both work thanks guys.
Report Abuse
toadjesse is not online. toadjesse
Joined: 03 Jun 2008
Total Posts: 5617
19 May 2013 08:34 AM
Oh silly.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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