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: What's wrong with this

Previous Thread :: Next Thread 
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
11 Apr 2013 11:31 AM
It is this piece of code:

elseif Check(Player.Name, Admins) then
local LMsg = Msg:lower()
if Msg:sub(1) == "#" then
if Player.Character then
object=Msg:sub(2)
b = game.Workspace:FindFirstChild(object)
torso = Player.Character:FindFirstChild("Torso")
if torso ~= nil and b~=nil then
torso.CFrame = b.CFrame
----
No output
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
11 Apr 2013 11:38 AM
if msg:sub(1,1) == "#" then
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
11 Apr 2013 12:00 PM
Didn't change anything...
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
11 Apr 2013 12:06 PM
Print msg:sub(1,1) == "#" and msg. What is the output?
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
11 Apr 2013 12:11 PM
There is no output.
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
11 Apr 2013 12:15 PM
Where are you printing that? After the elseif?
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
11 Apr 2013 12:17 PM
elseif Check(Player.Name, Admins) then
local LMsg = Msg:lower()
if msg:sub(1,1) == "#" and msg then
Print (msg:sub(1,1) == "#" and msg) --There.
if Player.Character then
object=Msg:sub(2)
b = game.Workspace:FindFirstChild(object)
torso = Player.Character:FindFirstChild("Torso")
if torso ~= nil and b~=nil then
torso.CFrame = b.CFrame
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
11 Apr 2013 12:19 PM
Well that failed badly. Try this:

elseif Check(Player.Name, Admins) then
print(msg:sub(1,1) == "#", msg)
local LMsg = Msg:lower()
if msg:sub(1,1) == "#" and msg then
if Player.Character then
object=Msg:sub(2)
b = game.Workspace:FindFirstChild(object)
torso = Player.Character:FindFirstChild("Torso")
if torso ~= nil and b~=nil then
torso.CFrame = b.CFrame
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
11 Apr 2013 12:52 PM
printing the message did nothing. As I can not start server ---> player and disable the safe chat so I do not see what is printed because, I have to use remote debugging monitoring system.
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
11 Apr 2013 01:00 PM
then:

pcall(function() error(tostring(msg:sub(1, 1) == "#"), msg) end)
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
11 Apr 2013 01:02 PM
or use game.Players:Chat("message") in Start Player.
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
11 Apr 2013 01:18 PM
Just tried that and the command doesn't function.
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
11 Apr 2013 01:19 PM
It doesn't print anything either. So no output.
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
11 Apr 2013 01:28 PM
Is the Check function failing? try printing that.
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
11 Apr 2013 01:48 PM
The check function won't print.
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