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

Previous Thread :: Next Thread 
TheBuilderX124 is not online. TheBuilderX124
Joined: 23 Feb 2012
Total Posts: 15380
08 Oct 2014 07:16 AM
[ Content Deleted ]
Report Abuse
TheBuilderX124 is not online. TheBuilderX124
Joined: 23 Feb 2012
Total Posts: 15380
08 Oct 2014 07:19 AM
[ Content Deleted ]
Report Abuse
OzzyFin is not online. OzzyFin
Joined: 07 Jun 2011
Total Posts: 3600
08 Oct 2014 07:30 AM
function (p) -- p isn't a name in this situation, it is a parameter.
h=instance.New("Hint")
ws=game.Workspace -- this is not needed at all
ps=script.Parent
if ps.NumPlayers=>5 -- script has to be inside game.Players, not sure it is
then ws.h.Text=("THIS IS A WORKING SCRIPT") -- no

--missing an end
end

-- you never call the function, thought it's not even possible when function doesn't have a name.

Okay, so. First I would say to take a couple of looks to the wiki and learn more about functions.
http://wiki.roblox.com/index.php?title=Function

To the script:


function hint(parent) -- we called the function with an argument called "workspace", which means game.Workspace
h=instance.New("Hint")
h.Parent = parent -- change hint's Parent to "parent" which is workspace.
ps=script.Parent
if ps.NumPlayers=>5 then
h.Text=("THIS IS A WORKING SCRIPT")
end
end

hint(workspace) -- calling the function
Report Abuse
OzzyFin is not online. OzzyFin
Joined: 07 Jun 2011
Total Posts: 3600
08 Oct 2014 07:38 AM
Scripts won't run inside game.Players.

Use ServerScriptService or workspace.
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