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 » Scripters
Home Search
 

Re: What?

Previous Thread :: Next Thread 
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
23 Apr 2015 09:00 PM
ServerScriptStorage is not a valid member of DataModel

I did this:

local TextLabel = game.StarterGui.ScreenGui:WaitForChild("TextLabel")
local ServerScriptStorage = game:WaitForChild("ServerScriptStorage")

while wait() do
if game.Players.NumPlayers < 2 then
script.Parent.TextLabel.Text = "Not Enough Players, please invite a friend!"
elseif game.Players.NumPlayers >= 2 then
for i = 10, 0, -1 do
script.Parent.TextLabel.Text = "There are now enough players, server Start-Up in "..i.." Seconds"
wait(1)
game.ServerScriptService.GameScript.Disabled = false
end
break
end
end
TextLabel.Visible = false
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
23 Apr 2015 09:01 PM
"ServerScriptService" *
Report Abuse
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
23 Apr 2015 09:03 PM
Still makes no sense if you tell me that.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
23 Apr 2015 09:04 PM
It's called ServerScriptService, not ServerScriptStorage.
Report Abuse
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
23 Apr 2015 09:05 PM
Oops. *Face-Palm*
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
23 Apr 2015 09:06 PM
local SS = game.ServerScriptService

Just use that.
Report Abuse
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
23 Apr 2015 09:09 PM
Still saying It's not a valid member of DataModel.
Report Abuse
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
23 Apr 2015 09:10 PM
local TextLabel = game.StarterGui.ScreenGui:WaitForChild("TextLabel")
local ServerScriptService = game.ServerScriptService
local GS = ServerScriptService:WaitForChild("Game Script")

while wait() do
if game.Players.NumPlayers < 2 then
script.Parent.TextLabel.Text = "Not Enough Players, please invite a friend!"
elseif game.Players.NumPlayers >= 2 then
for i = 10, 0, -1 do
script.Parent.TextLabel.Text = "There are now enough players, server Start-Up in "..i.." Seconds"
wait(1)
GS.Disabled = false
end
break
end
end
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
23 Apr 2015 09:18 PM
Instead of using a localscript, use a server script and iterate through the player's gui's to change the message.
Report Abuse
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
23 Apr 2015 09:20 PM
So I never needed a local script in the frame?
Report Abuse
Viscoelastic is not online. Viscoelastic
Joined: 04 May 2012
Total Posts: 269
23 Apr 2015 09:22 PM
No, you should use a LocalScript, but LocalScripts can't access SERVERStorage and SERVERScriptService.
Report Abuse
Viscoelastic is not online. Viscoelastic
Joined: 04 May 2012
Total Posts: 269
23 Apr 2015 09:23 PM
But actually, you should use a Script server-side, and use FireAllClients with a RemoteEvent and have it change the text through that in a LocalScript.
Report Abuse
SurfaceLight is not online. SurfaceLight
Joined: 06 Apr 2014
Total Posts: 7574
23 Apr 2015 09:27 PM
I can't do Events.

They are impossibly hard to me.
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
23 Apr 2015 09:27 PM
No. Just do something like this in a server script.

while wait() do
for i,v in pairs(game.Players:GetChildren()) do
for i,g in pairs(v.PlayerGui:GetChildren() do
if g.Name == "ScreenGui" then
if game.Players.NumPlayers < 2 then
g.TextLabel.Text = "Not enough Players, please invite a friend!"
elseif game.Players.NumPlayers >= 2 then
for i = 10,0,-1 do
g.TextLabel.Text = "There are now enough players, server Start-Up in" ..i.." Seconds"
wait(1)
end
game.ServerScriptService.GameScript.Disabled = false
game.StarterGui.ScreenGui.TextLabel.Visible = false
g.TextLabel.Visible = false
end
end
end
end
end


Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
23 Apr 2015 09:30 PM
Also add an ")" to line 3. Also, you can add a "repeat wait() until game.ServerStorage.GameScript.Disabled = true for this script to wait until the game is ended for this to start again.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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