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 » Scripters
Home Search
 

Re: How come this isnt working [string.match]

Previous Thread :: Next Thread 
Crousant02 is not online. Crousant02
Joined: 15 Feb 2013
Total Posts: 292
12 May 2015 04:34 PM
elseif msg:sub(1,3):lower() == "tp;" then
local Name,TpPerson = msg:match("tp;(%w+);(%d+)") if Name and TpPerson then
for i,v in next, game.Players:GetPlayers() do
if v.Name:sub(1,#Name):lower() == Name:lower() then
Name.Character:MoveTo(TpPerson.Character.Torso.CFrame*CFrame.new(0,5,0))


It has no output and it doesnt work.
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
12 May 2015 04:37 PM
Example usage? Also Name and TpPerson never became Players
Report Abuse
Crousant02 is not online. Crousant02
Joined: 15 Feb 2013
Total Posts: 292
12 May 2015 04:38 PM
The usage would be

tp;crou;elun

Which would move me to you, with an offset of 5 on the Y axis

and what do you mean they dont become players?
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
12 May 2015 04:47 PM
Oh dear it's alright guys I made a thing for this a while ago... But I can't find it

local pre = "!"
local sep = "|"
local cmds = {}

local parse = function(Message)
local cmd, tempargs = Message:match(pre.."(.+)"..sep.."?(.*)");
local args = {};
tempargs:gsub("[^"..sep.."]+",function(c) table.insert(args,c) end);
return cmd, args;
end;

local run = function(Player, Message)
local c,r = parse(Message);
if cmds[c] then cmds[c](Player, unpack(r)) end;
end
Report Abuse
Crousant02 is not online. Crousant02
Joined: 15 Feb 2013
Total Posts: 292
12 May 2015 04:50 PM
Uh, i already have my own but thanks.. I just wanna fix that cmd please '-'

Also i know this isnt the thread for it but why wont this work?

for i = 10,1,.1 do
wait(1)
TextLabel.Transparency = i/10
end

It supposed to fade it by .1
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
12 May 2015 04:52 PM
for i = 10,1,-1 do

Also, "tp;(%w+);(%w+)"
Report Abuse
Crousant02 is not online. Crousant02
Joined: 15 Feb 2013
Total Posts: 292
12 May 2015 05:25 PM
b
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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