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: How do i do this?

Previous Thread :: Next Thread 
masterjosue1998 is not online. masterjosue1998
Joined: 21 Feb 2011
Total Posts: 949
02 Jul 2014 07:58 AM
Im making a minigame place. I wanna make a script that shows a list of winners. I need a script of a message saying people's name of the workspace saying that they won the game. For example, if there is the players a,b and c it would appear a message saying "a,b and c won the game" How do i do that?

I know how do the rest (sorry for my english)
Report Abuse
masterjosue1998 is not online. masterjosue1998
Joined: 21 Feb 2011
Total Posts: 949
02 Jul 2014 08:13 AM
...
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
02 Jul 2014 08:14 AM
WinningTable = {}
WinningMessage = Instance.new("Message")
while wait() do
for i,v in pairs(WinningTable) do
table.insert(WinningTable, Player.Name)
if #Winning == AmountOfPlayersHere then
WinningMessage.Text = v.."Has won!"
break
end
end
end
You'll have to adjust this to work with your script.
Report Abuse
YeahNick is not online. YeahNick
Joined: 28 Feb 2009
Total Posts: 2536
02 Jul 2014 08:15 AM
local m = Instance.new("Message",Workspace)
m.Text = a.Name .. ", " .. b.Name .. " and " .. c.Name .. " won the game."

#Yolo
Report Abuse
masterjosue1998 is not online. masterjosue1998
Joined: 21 Feb 2011
Total Posts: 949
04 Jul 2014 12:46 PM
Amount of players do you mean their name or just the number of players?
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
04 Jul 2014 12:48 PM
Text = Winners.concat(', ').." has won!"
Report Abuse
masterjosue1998 is not online. masterjosue1998
Joined: 21 Feb 2011
Total Posts: 949
04 Jul 2014 12:57 PM
So if i want to make a script that makes a message with all name players in the game, what do i edit?

WinningTable = {}
WinningMessage = Instance.new("Message")
while wait() do
for i,v in pairs(WinningTable) do
table.insert(WinningTable, Player.Name)
if #Winning == AmountOfPlayersHere then
WinningMessage.Text = v.."Has won!"
break
end
end
end
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
04 Jul 2014 01:00 PM
Change "AmountOfPlayersHere" to the amount of winners you want.
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
04 Jul 2014 01:00 PM
Also, change #Winning to #WinningTable
Report Abuse
masterjosue1998 is not online. masterjosue1998
Joined: 21 Feb 2011
Total Posts: 949
04 Jul 2014 01:01 PM
game.Players:GetChildren()?
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
04 Jul 2014 01:04 PM
WinningTable = {}
WinningMessage = Instance.new("Message")
WinValue = Instance.new("StringValue")
WinValue.Value = "Win"
while wait() do
for _,v in pairs(game.Players:GetChildren()) do
if v:FindFirstChild("WinValue") then
table.insert(WinningTable, v.Name)
if #Winning == AmountOfPlayersHereThatWon then
WinningMessage.Text = v.."Has won!"
break
end
end
end
end
Report Abuse
masterjosue1998 is not online. masterjosue1998
Joined: 21 Feb 2011
Total Posts: 949
04 Jul 2014 01:18 PM
20:16:09.520 - Workspace.Script:7: attempt to concatenate local 'v' (a userdata value)
Report Abuse
masterjosue1998 is not online. masterjosue1998
Joined: 21 Feb 2011
Total Posts: 949
04 Jul 2014 01:19 PM
something is wrong with WinningMessage.Text = v.."has won"
Report Abuse
AnonyAnonymous is not online. AnonyAnonymous
Joined: 23 Jun 2013
Total Posts: 6332
04 Jul 2014 01:23 PM
WinningMessage.Text = v.Name.."Has won!"
Report Abuse
masterjosue1998 is not online. masterjosue1998
Joined: 21 Feb 2011
Total Posts: 949
04 Jul 2014 01:24 PM
Thx it works :D
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