human
|
  |
| Joined: 06 May 2007 |
| Total Posts: 2765 |
|
|
| 09 Jul 2012 10:51 PM |
It works fine in solo, but it doesn't work online. I'm using it in a chat command as well, so there shouldn't be a problem with not finding me before I join the game, since I'm not telling it to run until after I join the game anyways.
player0 = game:GetService("Players").human for i, v in pairs(game.Players:GetChildren()) do local gui = Instance.new("ScreenGui", game.StarterGui) gui.Name = "Blackout" local frame = Instance.new("Frame", gui) local textlabel = Instance.new("TextLabel", frame) textlabel.Text = player0.Name.. " has you in a blackout" textlabel.Position = UDim2.new(.5,0,.5,0) textlabel.TextColor3 = Color3.new(255,255,255) textlabel.FontSize = "Size18" frame.Size = UDim2.new(1,0,1,0) frame.BackgroundColor = BrickColor.new(0,0,0) v.Character.Humanoid.Health = 0 end |
|
|
| Report Abuse |
|
|
Xnite515
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 22763 |
|
|
| 09 Jul 2012 10:55 PM |
Try this?
player0 = game.Players.human for i, v in pairs(game.Players:GetChildren()) do local gui = Instance.new("ScreenGui", game.StarterGui) gui.Name = "Blackout" local frame = Instance.new("Frame", gui) local textlabel = Instance.new("TextLabel", frame) textlabel.Text = player0.Name.. " has you in a blackout" textlabel.Position = UDim2.new(.5,0,.5,0) textlabel.TextColor3 = Color3.new(255,255,255) textlabel.FontSize = "Size18" frame.Size = UDim2.new(1,0,1,0) frame.BackgroundColor = BrickColor.new(0,0,0) v.Character.Humanoid.Health = 0 end
|
|
|
| Report Abuse |
|
|
|
| 09 Jul 2012 10:56 PM |
It don't wanna... Joke... player0 = game.Players.human
http://www.roblox.com/Forum/ShowPost.aspx?PostID=71965064 |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2012 10:59 PM |
This may not be your big problem, but your color ID's are slightly off:
If a am correct, Color3 is a value between 0 and 1, so you could write this
textlabel.TextColor3 = Color3.new(1,1,1)
In addition, BrickColor can hold either a string or integer value, such as this:
BrickColor.new("Really black") BrickColor.new(25) -- Note, these two examples are probably not the same color
If I am wrong here, please correct me. |
|
|
| Report Abuse |
|
|
human
|
  |
| Joined: 06 May 2007 |
| Total Posts: 2765 |
|
|
| 09 Jul 2012 11:01 PM |
thanks!
player0 = game:GetService("Players").human was the problem, but why? isn't that the same thing as game.Players.human? |
|
|
| Report Abuse |
|
|
Xnite515
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 22763 |
|
|
| 09 Jul 2012 11:02 PM |
| People can use Color3 as a range of 255 instead of one |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2012 11:02 PM |
No problem.. XD.
http://www.roblox.com/Forum/ShowPost.aspx?PostID=71965064 |
|
|
| Report Abuse |
|
|
|
| 09 Jul 2012 11:03 PM |
player0 = game:GetService("Players").human for i, v in pairs(game.Players:GetChildren()) do local gui = Instance.new("ScreenGui", game.StarterGui) gui.Name = "Blackout" local frame = Instance.new("Frame", gui) local textlabel = Instance.new("TextLabel", frame) textlabel.Text = player0.Name.. " has you in a blackout" textlabel.Position = UDim2.new(.5,0,.5,0) textlabel.TextColor3 = BrickColor.new("Your color").Color textlabel.FontSize = "Size18" frame.Size = UDim2.new(1,0,1,0) frame.BackgroundColor = BrickColor.new("Your color").Color v.Character.Humanoid.Health = 0 end
http://www.roblox.com/Forum/ShowPost.aspx?PostID=71965064
|
|
|
| Report Abuse |
|
|
|
| 09 Jul 2012 11:06 PM |
| Xnite, you mean to say that I've been dividing by 255 all these scripts for nothing?! That's great! |
|
|
| Report Abuse |
|
|
Xnite515
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 22763 |
|
|
| 09 Jul 2012 11:06 PM |
| I don't think GetService really looks in Players, or it didnt run in server. |
|
|
| Report Abuse |
|
|
Xnite515
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 22763 |
|
|
| 09 Jul 2012 11:08 PM |
| http://wiki.roblox.com/index.php/Color3 |
|
|
| Report Abuse |
|
|
human
|
  |
| Joined: 06 May 2007 |
| Total Posts: 2765 |
|
|
| 09 Jul 2012 11:10 PM |
| CeaselessSoul that didn't work, it seams GetService was the sole problem. :/ @xnite I'm using it for a different script and that works fine online, so idk why it doesn't work here. |
|
|
| Report Abuse |
|
|
| |
|
|
| 10 Jul 2012 09:47 PM |
| Xnite, I couldn't help but notice that the wiki page you posted states, "Color3 values only range from 0 to 1." Although we would realy love to use a scale from 0 to 255 in color3, we still must divide these values by 255 to get them into correct form. |
|
|
| Report Abuse |
|
|
MrNicNac
|
  |
| Joined: 29 Aug 2008 |
| Total Posts: 26567 |
|
|
| 10 Jul 2012 09:52 PM |
| The DynamicVariable is static and correct. |
|
|
| Report Abuse |
|
|