Metology
|
  |
| Joined: 06 Oct 2014 |
| Total Posts: 3255 |
|
|
| 11 Jan 2016 05:51 PM |
game.Players.PlayerAdded:connect(function() while true do wait() game.Players.LocalPlayer.Chatted:connect(function(ui) for i,v in pairs(game.Players:GetChildren()) do p = Instance.new("Part",v.Character.Head) if game.Players.LocalPlayer.Chatted == "brick" then while true do wait() p end) end end end)
|
|
|
| Report Abuse |
|
|
|
| 11 Jan 2016 05:54 PM |
no need for the first loop.
#Code print("Song Link: http://www.roblox.com/Deorro-vs-Swedish-House-Mafia-Save-The-5-Hours-item?id=340827217") |
|
|
| Report Abuse |
|
|
|
| 11 Jan 2016 05:56 PM |
| What exactly are you trying to do? Even removing the errors, the script doesn't make much sense. Are you trying to put a brick on top of the player when they chat "Brick"? |
|
|
| Report Abuse |
|
|
Metology
|
  |
| Joined: 06 Oct 2014 |
| Total Posts: 3255 |
|
|
| 11 Jan 2016 05:57 PM |
new revised version: game.Players.PlayerAdded:connect(function()
game.Players.LocalPlayer.Chatted:connect(function(ui) for i,v in pairs(game.Players:GetChildren()) do if v.Chatted == "brick" then while true do wait() p = Instance.new("Part",v.Character.Head) end end end end)
error: 18:55:38.027 - Workspace.Script:17: 'end' expected (to close 'function' at line 1)
|
|
|
| Report Abuse |
|
|
Metology
|
  |
| Joined: 06 Oct 2014 |
| Total Posts: 3255 |
|
|
| 11 Jan 2016 05:58 PM |
@^^ yes exactly..
Never really use this, so im stupid
|
|
|
| Report Abuse |
|
|
Metology
|
  |
| Joined: 06 Oct 2014 |
| Total Posts: 3255 |
|
|
| 11 Jan 2016 05:58 PM |
Its supposed to make a never ending bricks fly out of the players head when they chat "brick"
|
|
|
| Report Abuse |
|
|
|
| 11 Jan 2016 06:01 PM |
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if msg == "brick" and player.Character then local p = Instance.new("Part",player.Character) p.Position = player.Character:FindFirstChild("Torso") end end) end) |
|
|
| Report Abuse |
|
|
Metology
|
  |
| Joined: 06 Oct 2014 |
| Total Posts: 3255 |
|
| |
|
Metology
|
  |
| Joined: 06 Oct 2014 |
| Total Posts: 3255 |
|
|
| 11 Jan 2016 06:07 PM |
Tweeked the code you had and this works:
game.Players.PlayerAdded:connect(function(player) player.Chatted:connect(function(msg) if msg == "brick" then for i,v in pairs(game.Players:GetChildren()) do while true do wait() p = Instance.new("Part",v.Character.Head) end end end end) end)
thanks, just edited a little :)
|
|
|
| Report Abuse |
|
|
|
| 11 Jan 2016 06:09 PM |
| I lateposted and missed the "never ending" part, sorry. |
|
|
| Report Abuse |
|
|
Metology
|
  |
| Joined: 06 Oct 2014 |
| Total Posts: 3255 |
|
| |
|