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: Script Not Working

Previous Thread :: Next Thread 
deathreaper1555 is not online. deathreaper1555
Joined: 15 Jul 2008
Total Posts: 10
01 Oct 2013 08:50 PM
-- Not sure why this isn't working, whenever it checks 'PeoplePlaying' for their name, output says "soandso is not a valid member of Model" (PeoplePlaying is a model which stores player's names who have been on the server) This also has happened with a bunch of my other scripts, ontouch, etc. Not sure why the whole "is not a valid member" is coming up so much. Just came back after 2 years, maybe roblox changed some of scripting, dunno.

function onPlayerEntered(player)
gui = Instance.new("ScreenGui", player.PlayerGui)
txt = Instance.new("TextLabel", gui)
txt.Position = UDim2.new(0.4,0,0.3,0)
txt.Size = UDim2.new(0.1,0,0.1,0)
txt.BackgroundTransparency = 0.5
txt.BorderSizePixel = 3
txt.BorderColor = BrickColor.new("Bright red")
txt.BackgroundColor = BrickColor.new("Really red")

game:GetService("Debris"):AddItem(gui,3)

if game.Workspace.PeoplePlaying[player.Name] == false then


add = Instance.new("Model")
add.Name = player.Name
add.Parent = game.Workspace.PeoplePlaying
txt.Text = "Welcome"..pers.Name


else

txt.Text = "Welcome back to this server "..player.Name



end

end

game.Players.ChildAdded:connect(onPlayerEntered)
Report Abuse
evolvedpikachu is not online. evolvedpikachu
Joined: 18 Aug 2010
Total Posts: 10696
01 Oct 2013 08:52 PM
Use FindFirstChild().
Report Abuse
deathreaper1555 is not online. deathreaper1555
Joined: 15 Jul 2008
Total Posts: 10
01 Oct 2013 08:53 PM
tried that, still says the same thing, besides what i did is basically the same thing :\
Report Abuse
deathreaper1555 is not online. deathreaper1555
Joined: 15 Jul 2008
Total Posts: 10
01 Oct 2013 09:07 PM
OH just realized, had it set equal to ==false, it should be ==nil



hahaha, forgot this thread, thanks anyway :D
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