mytouch
|
  |
| Joined: 31 Oct 2010 |
| Total Posts: 83 |
|
|
| 04 Dec 2014 05:26 PM |
| I have a script where once a player touches a block it displays a message to everybody saying that "a player has won!" How would i make it so that it would say that it would say the actual player name instead of "a player"? |
|
|
| Report Abuse |
|
|
mytouch
|
  |
| Joined: 31 Oct 2010 |
| Total Posts: 83 |
|
| |
|
|
| 04 Dec 2014 06:08 PM |
function onTouch(hit) if hit and hit.Parent and game.Players:GetPlayerFromCharacter(hit.Parent) then local player = game.Players:GetPlayerFromCharacter(hit.Parent) local msg = Instance.new("Message", workspace) msg.Text = player.Name .. " has won!" wait(5) msg:Destroy() end end
script.Parent.Touched:connect(onTouch)
goes in block
|
|
|
| Report Abuse |
|
|