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: Need help with this script

Previous Thread :: Next Thread 
rockintyler8 is not online. rockintyler8
Joined: 04 Jun 2011
Total Posts: 2050
04 Feb 2012 06:07 PM
Hint Script May need help 2 minutes ago
**IT SHOULD BE UNDERSTOOD THAT I ALREADY HAVE A HINT IN A PLACE**
function onPlayerEntered(newPlayer)
local name = newPlayer.Name --Name of New Player (DONT CHANGE!)
local hint = Game.Workspace.Hint --Hint location (dont touch)
wait(0.5)
if name == "Player" then hint.Text = name.." is an Admin."
wait(60) --Let Everyone Know Your the admin 60 seconds
hint.Text = "Important Information will be displayed here.
else if name == name then hint.Text = newPlayer.Name.." Has Entered"
wait(10) --Alert Everyone 10 seconds
hint.Text = "Important Information will be displayed here.
end
end
end
game.Players.PlayerAdded:connect(onPlayerEntered)

I think i will have major trouble around if someone else enters within 60 seconds of the admin, or within 10 seconds of the Normal Player.

If we got rid of all the crazy people, we would have only 2000 people left.
Report Abuse
TwoBoo is not online. TwoBoo
Joined: 08 Feb 2011
Total Posts: 10790
04 Feb 2012 06:10 PM
Take off an end.
Report Abuse
Ravenshield is not online. Ravenshield
Joined: 21 Nov 2007
Total Posts: 4143
04 Feb 2012 06:12 PM
local hint = game.Workspace.Hint -- No need to define this every time a player enters, if it's a constant object.

game.Players.PlayerAdded:connect(function(newPlayer)
wait(0.5)
if newPlayer.Name:lower() == string:lower("Player") then -- Meh, why not
hint.Text = newPlayer.Name.." is an Admin."
wait(60)
else
hint.Text = newPlayer.Name.." Has Entered"
wait(10)
end

hint.Text = "Important Information will be displayed here." -- will be displayed after the above.
end)
Report Abuse
rockintyler8 is not online. rockintyler8
Joined: 04 Jun 2011
Total Posts: 2050
04 Feb 2012 06:21 PM
Not working?

If we got rid of all the crazy people, we would have only 2000 people left.
Report Abuse
GrandAwsome is not online. GrandAwsome
Joined: 12 Jul 2011
Total Posts: 326
04 Feb 2012 06:23 PM
im happy to be one of those people, now could some one help me on my thread?
Report Abuse
rockintyler8 is not online. rockintyler8
Joined: 04 Jun 2011
Total Posts: 2050
04 Feb 2012 06:27 PM
18:26:35 - Workspace.Script:4: calling 'lower' on bad self (string expected, got userdata)
18:26:35 - Script "Workspace.Script", Line 4
18:26:35 - stack end


If we got rid of all the crazy people, we would have only 2000 people left.
Report Abuse
Ravenshield is not online. Ravenshield
Joined: 21 Nov 2007
Total Posts: 4143
04 Feb 2012 06:28 PM
game.Players.PlayerAdded:connect(function(newPlayer)
wait(0.5)
if newPlayer.Name == "Player" then
hint.Text = newPlayer.Name.." is an Admin."
wait(60)
else
hint.Text = newPlayer.Name.." Has Entered"
wait(10)
end

hint.Text = "Important Information will be displayed here."
end)
Report Abuse
rockintyler8 is not online. rockintyler8
Joined: 04 Jun 2011
Total Posts: 2050
04 Feb 2012 06:29 PM
18:29:13 - Workspace.Script:4: attempt to index global 'hint' (a nil value)
18:29:13 - Script "Workspace.Script", Line 4
18:29:13 - stack end


If we got rid of all the crazy people, we would have only 2000 people left.
Report Abuse
Ravenshield is not online. Ravenshield
Joined: 21 Nov 2007
Total Posts: 4143
04 Feb 2012 06:30 PM
That was an obvious one. :P

local hint = game.Workspace.Hint

game.Players.PlayerAdded:connect(function(newPlayer)
wait(0.5)
if newPlayer.Name == "Player" then
hint.Text = newPlayer.Name.." is an Admin."
wait(60)
else
hint.Text = newPlayer.Name.." Has Entered"
wait(10)
end

hint.Text = "Important Information will be displayed here."
end)
Report Abuse
rockintyler8 is not online. rockintyler8
Joined: 04 Jun 2011
Total Posts: 2050
04 Feb 2012 06:31 PM
forgot to add in local.....

If we got rid of all the crazy people, we would have only 2000 people left.
Report Abuse
rockintyler8 is not online. rockintyler8
Joined: 04 Jun 2011
Total Posts: 2050
04 Feb 2012 06:31 PM
I forgot to look that time. I just realized it.

If we got rid of all the crazy people, we would have only 2000 people left.
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