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: Teleporting .Chated

Previous Thread :: Next Thread 
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
22 Dec 2012 08:59 PM
The .Chatted event does not seem to working properly...it says added then when i say the command nothing happens. any help?


function m(text)
local m = Instance.new("Message",workspace)
m.Text = text
wait(3)
m:Destroy()
end

game.Players.PlayerAdded:connect(function(p)
m("added")
p.Chatted:connect(function(m)
M("chatted")
if string.lower(m) == string.lower("tele") then
m("Aproived")
local NextPos = Workspace:FindFirstChild("TeleScript")
c.CFrame = NextPos.CFrame
m("teleported")
ff = Instance.new("ForceField",c)
wait(5)
m("ff made")
if ff ~= nil then
ff:Destroy()
m("ff ate")
end
end
end)
end)
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
22 Dec 2012 09:00 PM
*facepalm* capital m
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
22 Dec 2012 09:04 PM
I changed the "M" to "m" but still nothing
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
22 Dec 2012 09:07 PM
Your function and Chatted parameter have the same variable.

¤ † KMXD† ¤
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
22 Dec 2012 09:08 PM
Updated but still broken:


function m(text)
local m = Instance.new("Message",workspace)
m.Text = text
wait(3)
m:Destroy()
end

game.Players.PlayerAdded:connect(function(p)
m("added")
p.Chatted:connect(function(m)
m("chatted")
if string.lower(m) == string.lower("tele") then
m("Aproived")
local NextPos = Workspace:FindFirstChild("TeleScript")
c.Torso.CFrame = NextPos.CFrame
m("teleported")
ff = Instance.new("ForceField",c)
wait(5)
m("ff made")
if ff ~= nil then
ff:Destroy()
m("ff ate")
end
end
end)
end)
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
22 Dec 2012 09:11 PM
Hmm I will try that.
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
22 Dec 2012 09:14 PM
Okay now i get up to the "aproved" when i say the command...what else is wrong


function m(text)
local m = Instance.new("Message",workspace)
m.Text = text
wait(3)
m:Destroy()
end

game.Players.PlayerAdded:connect(function(p)
m("added")
p.Chatted:connect(function(msg)
m("chatted")
if string.lower(msg) == string.lower("tele") then
m("Aproived")
local NextPos = Workspace:FindFirstChild("TeleScript")
c.Torso.CFrame = NextPos.CFrame
m("teleported")
ff = Instance.new("ForceField",c)
wait(5)
m("ff made")
if ff ~= nil then
ff:Destroy()
m("ff ate")
end
end
end)
end)
Report Abuse
Jonah13249 is not online. Jonah13249
Joined: 09 Oct 2009
Total Posts: 2105
22 Dec 2012 09:16 PM
I'm not sure you are teleporting anyone to anywhere...
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
22 Dec 2012 09:19 PM
huh?
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
22 Dec 2012 09:27 PM
lol...i forgot do define "c"
Report Abuse
Jonah13249 is not online. Jonah13249
Joined: 09 Oct 2009
Total Posts: 2105
22 Dec 2012 09:29 PM
c.Torso.CFrame = NextPos.CFrame

I'm assuming that NextPos is a script, and CFrame would need a Vector3 value.
Report Abuse
Jonah13249 is not online. Jonah13249
Joined: 09 Oct 2009
Total Posts: 2105
22 Dec 2012 09:30 PM
Please run your script and use output.

Go through trial and error.
Report Abuse
xXGrekXx is not online. xXGrekXx
Joined: 09 Nov 2012
Total Posts: 124
22 Dec 2012 09:30 PM
Awesome script :D
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
22 Dec 2012 09:32 PM
NextPos is a variable pointing to a brick...i name things wierd...anyways i fixed it

function m(text)
local m = Instance.new("Message",workspace)
m.Text = text
wait(3)
m:Destroy()
end

game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(c)
m("added")
p.Chatted:connect(function(msg)
m("chatted")
if string.lower(msg) == string.lower("tele") then
m("Aproived")
local NextPos = Workspace:FindFirstChild("TeleScript")
c:MoveTo(NextPos.Position,NextPos)
m("teleported")
ff = Instance.new("ForceField",c)
wait(5)
m("ff made")
if ff ~= nil then
ff:Destroy()
m("ff ate")
end
end
end)
end)
end)
Report Abuse
Jonah13249 is not online. Jonah13249
Joined: 09 Oct 2009
Total Posts: 2105
22 Dec 2012 09:36 PM
@grek

Awesome for a command. If you knew how to script ( and I recommend it ) you could make even better.
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
22 Dec 2012 09:37 PM
and i can not use output and run it in play solo because you cant chat...and start server/player lags my computer too much.
Report Abuse
notsopwnedg is not online. notsopwnedg
Joined: 07 Nov 2010
Total Posts: 4182
22 Dec 2012 09:38 PM
I would be able to make it more complex and carry out more functions but this suits my needs very well.
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