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: Fairly Advanced Script help

Previous Thread :: Next Thread 
NiceCoder is not online. NiceCoder
Joined: 15 Oct 2012
Total Posts: 6593
11 Jan 2014 04:46 PM
--So, I've been trying to make a command into Kohl's admin, ":complex plr" that basically teleports a player to The Complex, mostly to annoy people who annoy me at my places or places I got my version of Kohl's in.
-This is what I've been at trying to make the command

if msg:lower():sub(1,6) == "complex" then
local chk1 = msg:lower():sub(7):find(" ") + 6
local plrz = GetPlr(plr, msg:lower():sub(7,chk1-1))
game:GetService("TeleportService"):Teleport(63014010, plyr.Character)
end

>>and this is the actual :place plr ID command of Kohl's except for that's not at all what I want, I want :complex plr to teleport the player to the specific place ID

if msg:lower():sub(1,6) == "place " then
local chk1 = msg:lower():sub(7):find(" ") + 6
local plrz = GetPlr(plr, msg:lower():sub(7,chk1-1))
for i, v in pairs(plrz) do
coroutine.resume(coroutine.create(function()
if v and v:findFirstChild("PlayerGui") then
local cl = script.LocalScriptBase:Clone() cl.Code.Value = [[game:service("TeleportService"):Teleport(]] .. msg:sub(chk1+1) .. ")" cl.Parent = v.PlayerGui cl.Disabled = false
end
end))
end
end

>>Any ideas on how to do this?
Report Abuse
NiceCoder is not online. NiceCoder
Joined: 15 Oct 2012
Total Posts: 6593
12 Jan 2014 02:52 AM
It is not working. Bump.
Report Abuse
Geomaster is not online. Geomaster
Joined: 05 Jul 2008
Total Posts: 1480
12 Jan 2014 03:14 AM
Here's the ding-dang dillio

You can't test chat scripts in studio
You don't have an output in online mode
Try going to a scriptbuilder, download an SB bot
Only way to really test it unless you can find / make an output GUI
Report Abuse
NiceCoder is not online. NiceCoder
Joined: 15 Oct 2012
Total Posts: 6593
12 Jan 2014 04:36 AM
no you don't get my point
i'm adding a command to kohl's admin, so everything is defined
therefore I can test it by simply updating my version of Kohl's
I just need to know where's the error
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
12 Jan 2014 08:01 AM
...
":sub(1,6) == "complex""
print(#"complex")
>7
"1,6"
"6"
"place "
" "
Report Abuse
breuning is not online. breuning
Joined: 30 Oct 2008
Total Posts: 4268
12 Jan 2014 08:03 AM
if msg:lower():sub(1,8) == "complex " then
local chk1 = msg:lower():sub(7):find(" ") + 8
local plrz = GetPlr(plr, msg:lower():sub(9,chk1-1))
game:GetService("TeleportService"):Teleport(63014010, plyr.Character)
end
Report Abuse
NiceCoder is not online. NiceCoder
Joined: 15 Oct 2012
Total Posts: 6593
12 Jan 2014 08:08 AM
breu that doesn't really seem to work, I wonder is it because I have nobody to test it with, not all commands work on :command me, I suppose
Report Abuse
breuning is not online. breuning
Joined: 30 Oct 2008
Total Posts: 4268
12 Jan 2014 08:09 AM
if msg:lower():sub(1,8) == "complex " then
local chk1 = msg:lower():sub(7):find(" ") + 8
local plrz = GetPlr(plr, msg:lower():sub(9,chk1-1))
game:GetService("TeleportService"):Teleport(63014010, plrz.Character)
end
Report Abuse
VoidShredder is not online. VoidShredder
Joined: 06 Jan 2014
Total Posts: 1467
12 Jan 2014 08:15 AM
if msg:lower():sub(1,8) == "complex " then
local plrz = GetPlr(plr, msg:lower():sub(9))
for i, v in pairs(plrz) do
coroutine.resume(coroutine.create(function()
if v and v.Character then
game:service("TeleportService"):Teleport(placeid, v.Character)
end
end))
end
end

Very basic.
Report Abuse
NiceCoder is not online. NiceCoder
Joined: 15 Oct 2012
Total Posts: 6593
12 Jan 2014 08:24 AM
thanks void, I know where i went wrong, I just didn't know the correct way to put the script together
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