|
| 04 Jun 2014 06:32 PM |
Not a scripter, not my script, but I do understand it a bit
function onChatted(msg, recipient, speaker)
local source = string.lower(speaker.Name) msg = string.lower(msg) local pos1 = script.Parent.Position local pos2 = speaker.Character.Head.Position dist=(pos1-pos2).magnitude dist=dist-math.max(math.max(speaker.Character.Head.Size.x, speaker.Character.Head.Size.z), speaker.Character.Head.Size.y) if (dist <= 5 and script.Parent.On.Value == true) then local m = Instance.new("Hint") h.Parent = game.Workspace h.Text = msg wait(10) h:remove() end
end
function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) end
game.Players.ChildAdded:connect(onPlayerEntered) |
|
|
| Report Abuse |
|
|
diabete
|
  |
| Joined: 07 May 2014 |
| Total Posts: 230 |
|
|
| 04 Jun 2014 06:34 PM |
You mean like what it does?
if 1 + 1 ~= 2 then print("The world is ending!") elseif 1 + 1 == "fish" then print("All is well") |
|
|
| Report Abuse |
|
|
|
| 04 Jun 2014 06:37 PM |
| I need the message to come out, I don't see any issues, it doesn't work, idk if roblox is to blame. |
|
|
| Report Abuse |
|
|
diabete
|
  |
| Joined: 07 May 2014 |
| Total Posts: 230 |
|
|
| 04 Jun 2014 06:40 PM |
local h = Instance.new("Hint", nil) game.Players.PlayerAdded:connect(function(p) repeat wait() until p.Character p.Chatted:connect(function(msg) h.Text = msg wait(3) h.Parent = nil end) end) |
|
|
| Report Abuse |
|
|
diabete
|
  |
| Joined: 07 May 2014 |
| Total Posts: 230 |
|
|
| 04 Jun 2014 06:40 PM |
^ Insert siggy
if 1 + 1 ~= 2 then print("The world is ending!") elseif 1 + 1 == "fish" then print("All is well") |
|
|
| Report Abuse |
|
|
|
| 04 Jun 2014 06:43 PM |
| I'llgive it a try, tat seems much better and less sloppy |
|
|
| Report Abuse |
|
|
| |
|