| |
| |
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
|
  |
| 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 |
|