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
|
  |
| Joined: 15 Oct 2012 |
| Total Posts: 6593 |
|
| |
|
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
|
  |
| 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 |
|
|
|
| 12 Jan 2014 08:01 AM |
... ":sub(1,6) == "complex"" print(#"complex") >7 "1,6" "6" "place " " " |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|