|
| 22 Oct 2011 10:16 AM |
Okay so to start it off I don't really use OnChat functions that much so bare with me
--:script
function drawer() wait(2) h("Guess the word Guessers!",4) wait(5) local players = game.Players:GetChildren() it = players[math.random(1, #players)] playerit = game.Players:findFirstChild(it.Name) playerit.TeamColor = game.Teams.Drawer.TeamColor game.Lighting.wordGUI:clone().Parent = playerit.PlayerGui a(words[math.random(#words)]) playerit.PlayerGui.wordGUI.TextLabel.Text = playerit.PlayerGui.wordGUI.TextLabel.Text..game.Workspace.Word.Value game.Lighting.Clear:clone().Parent = playerit.Backpack game.Lighting.Paint:clone().Parent = playerit.Backpack playerit.Character.Torso.CFrame = game.Workspace.DrawBox.text.CFrame + Vector3.new(0,0,3) m("The drawer is "..it.Name,2) wait(0.45) for minutes = 0, 0, -1 do for seconds = 59, 0, -1 do wait(1) if seconds < 10 then s(minutes..":0"..seconds) else s(minutes..":"..seconds) end end end playerit.Character.Torso.CFrame = game.Workspace.DrawBox.box.CFrame + Vector3.new(0,0,3) playerit.Backpack.Paint:remove() playerit.Backpack.Clear:remove() playerit.PlayerGui.wordGUI:remove() cleanup() end
--m is a Function
But I need a OnChat function to only work in this function, don't direct to http://wiki.roblox.com/index.php/Using_the_Chatted_Event
or this
http://wiki.roblox.com/index.php/How_To:_Admin_Commands
I need help. |
|
|
| Report Abuse |
|
|
|
| 22 Oct 2011 10:18 AM |
| BTW this is a pictionary game. |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Oct 2011 10:45 AM |
i think this info is correct, but its been a little while.
.chatted event is acutally pretty simple
function player(p)-- so the chatted event works on everyone function chat(msg) print(msg)-- will print what the person said
if string.sub(1,5,msg) == "hello" then -- string.sub can be used to only accept a certain amount of characters, making it easier to check if someone said "hello" the '1,5,msg' '1' is the first character '5' is the last and 'msg' is what the player said, so now it checks the first 5 letters of which you said. print("hello to you to!") end -- end of if statement
end -- end of chatted end -- end of playeradded p.Chatted:connect(chat) -- connection line to chatted event game.Players.PlayerAdded:connect(player)--connection line for the playeradded event |
|
|
| Report Abuse |
|
|
| |
|
| |
|
swmaniac
|
  |
| Joined: 28 Jun 2008 |
| Total Posts: 15773 |
|
|
| 22 Oct 2011 11:33 AM |
Uh, nothing in that script you posted has anything to do with the .Chatted event.
What do you want us to do? |
|
|
| Report Abuse |
|
|
|
| 22 Oct 2011 11:35 AM |
| Okay I said bare with me I need help like how I would insert that script into the script in my function there. |
|
|
| Report Abuse |
|
|