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: Would this work?

Previous Thread :: Next Thread 
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
06 May 2013 10:44 PM
if Msg:sub(1, 11) == "#showbricks" then
for _, brick in pairs(Game.Workspace:GetChildren()) do
if brick:IsA("Part") then
a=Var.Brick:Clone()
a.Parent = Player.PlayerGui
c= Player.PlayerGui.Brick.Parts
c.Text = brick
b= Player.PlayerGui.Brick
b.Frame:TweenSize(UDim2(0, 500, 0, 300), "Out", "Quad", 4, true)
b.Frame:TweenPosition(UDim2(0, 400, 0, 100), "Out", "Quad", 4, true)
b.Name:TweenPosition(UDim2(0, 620, 0, 120), "Out", "Quad", 6, true)
b.Parts:TweenSize(UDim2(0, 500, 0, 200), "Out", "Quad", 7, true)
b.Parts:TweenPosition(UDim2(0, 400, 0, 200), "Out", "Quad", 7, true)
wait(7)
b.Parts.Transparency = 1
end end end

I can not test this because, I keep getting Error Id 17..

Note: Everything is defined and do not ask me to post the whole script because, it is almost 300 lines.
Report Abuse
KillerKyle is not online. KillerKyle
Joined: 29 Jul 2007
Total Posts: 6371
06 May 2013 10:45 PM
I can't tell you if it works because you left out all your variables.

I have no idea what "brick" is. But I can tell you, if brick does not equal something in quotes, it won't work.
Report Abuse
epicfail22 is not online. epicfail22
Joined: 25 Sep 2009
Total Posts: 3739
06 May 2013 10:48 PM
Not completely sure if this is the issue, but by the looks of it this may be it.

a=Var.Brick:Clone()

should be

a=brick:Clone()
Report Abuse
KillerKyle is not online. KillerKyle
Joined: 29 Jul 2007
Total Posts: 6371
06 May 2013 10:48 PM
if brick:IsA("Part") then

c.Text = brick

-----------------------------------------------------------

This tells me this will not work. It should be..

c.Text = brick.Name
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
06 May 2013 10:55 PM
If you are talking about 'brick' in the:

for _, brick in pairs(Game.Workspace:GetChildren()) do

Then brick is simply used to represent the table. Hence the:

if brick:IsA("Part") then
---

If you are talking about: Brick in: a=Var.Brick:Clone()

Then "Brick" is a ScreenGui.
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
06 May 2013 10:55 PM
Ye I caught that. So I changed it to:

c.Text = brick.Name..""
Report Abuse
epicfail22 is not online. epicfail22
Joined: 25 Sep 2009
Total Posts: 3739
06 May 2013 11:02 PM
1.) The Name property is already a string...

2.) Even if it wasn't, that could potentially throw an error...

3.) The proper way to convert to a string is by using the tostring() function
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
06 May 2013 11:40 PM
@Epic it worked.. I wanted to know if it WOULD WORK. I said that I couldn't check it so I wanted to know if it would work and it did.
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
07 May 2013 12:34 AM
Actually I have ran into a problem it only shows one name at a time instead of a list like I thought it would show.
Report Abuse
KillerKyle is not online. KillerKyle
Joined: 29 Jul 2007
Total Posts: 6371
07 May 2013 03:11 AM
Look, it doesn't matter how long your script is, if you don't show us anything, we cannot fix it.
Report Abuse
gamert7 is not online. gamert7
Joined: 18 Nov 2008
Total Posts: 4986
07 May 2013 03:56 AM
K. There is nothing wrong with the rest of the script that is why I said it is too long and figured it was not needed. But here it is,

Var = game.Workspace.Gamert7AdminCommands
tab = { }
local Admins = {"gamert7", "money128", "Money128", "Player1", "player1", "HarperOfTheFreeNorth"}
local Banned = {}
Group = 854304

local Check = function(Name, Tab)
for _,v in pairs(Tab) do
if v == Name then
return true
end
end
return false
end

-----------------Reseting------------------------------
game.Players.PlayerAdded:connect(function(Player)
Player.Chatted:connect(function(Msg, speaker)



if Check(Player.Name, Banned) and not Check(Player.Name, Admins) then
Player:Remove()
elseif Check(Player.Name, Admins) then
local LMsg = Msg:lower()
if Msg:sub(1,6) == "#reset" and Player.Character then
Player.Character:BreakJoints()
end end
-----------------Teleporting--------------------
if Msg:sub(1,1) == "#" and Player.Character then
object=Msg:sub(2) if game.Workspace:FindFirstChild(object, true) and Player.Character then
b = game.Workspace:FindFirstChild(object)
torso = Player.Character:FindFirstChild("Torso")
if torso ~= nil and b~=nil then
torso.CFrame = b.CFrame
end end end
----------------Shutdown-----------------------
if Msg:sub(1,9) == "#shutdown" then Instance.new("ManualSurfaceJointInstance", workspace) end
---------------Kill----------------------------
if Msg:sub(1,5) == "#kill" then
local player = Msg:sub(7)
c = game.Players:FindFirstChild(player) if c then
if c.Character~=nil then
c.Character.Humanoid.Health = 0
end end end
-------------------Loop Killing--------------
if Msg:sub(1, 9) == "#loopkill" then
on = true
local players = Msg:sub(11)
d = game.Players:FindFirstChild(players) if d then
repeat wait() if d.Character ~= nil then d.Character:BreakJoints() end
until on == false
end end
if Msg:sub(1, 11) == "#unloopkill" then
on = false
end
-------Kicking------------------------------
if Msg:sub(1, 5) == "#kick" then
local player = Msg:sub(7) vt = game.Players:FindFirstChild(player) if vt then
local gui = game.Workspace.Gamert7AdminCommands.Banned a=gui:Clone() a.Parent=vt.PlayerGui
end end --Crashes the player.
-------------------Restoring health-----------------------------
if Msg:sub(1, 14) == "#restorehealth" then local player = Msg:sub(16)
lo = game.Players:FindFirstChild(player) if lo then
if lo.Character then lo.Character.Humanoid.Health = lo.Character.Humanoid.Health + 25
humanoid = lo.Character.Humanoid if humanoid.Health >= humanoid.MaxHealth then
humanoid.Health = humanoid.MaxHealth
end end end end
------------------Damaging their health---------------------------
if Msg:sub(1, 7) == "#damage" then local player = Msg:sub(9)
play = game.Players:FindFirstChild(player) if play then if play.Character then human = play.Character.Humanoid
human.Health = human.Health - 25
end end end
-------Restore full health--------------
if Msg:sub(1, 11) == "#fullhealth" then
local player = Msg:sub(13) b = game.Players:FindFirstChild(player) if b then
if b.Character then human=b.Character.Humanoid human.Health = human.MaxHealth
end end end
------Invisible-------------
if Msg:sub(1, 10) == "#invisible" then
local player = Msg:sub(12) c=game.Players:FindFirstChild(player) if c then if c.Character then
human = c.Character human.Head.Transparency = 1 human["Left Arm"].Transparency = 1
human["Left Leg"].Transparency = 1 human["Right Arm"].Transparency = 1
human["Right Leg"].Transparency = 1 human.Torso.Transparency = 1
end end end
-----Visible-----------------
if Msg:sub(1, 8) == "#visible" then
local player = Msg:sub(10) bo=game.Players:FindFirstChild(player) if bo then if bo.Character then
human = bo.Character human.Head.Transparency = 0 human["Left Arm"].Transparency = 0
human["Left Leg"].Transparency = 0 human["Right Arm"].Transparency = 0
human["Right Leg"].Transparency = 0 human.Torso.Transparency = 0
end end end
--God---
if Msg:sub(1, 4) == "#god" then local player = Msg:sub(6)
sko=game.Players:FindFirstChild(player) if sko then if sko.Character then
human = sko.Character human.Humanoid.Health = math.huge human.Humanoid.MaxHealth=math.huge
end end end
--ungod---
if Msg:sub(1, 6) == "#ungod" then local player = Msg:sub(8)
a=game.Players:FindFirstChild(player) if a then if a.Character then
human = a.Character human.Humanoid.Health = 100 human.Humanoid.MaxHealth=100
end end end
--------
if Msg:sub(1, 7) == "#freeze" then local player = Msg:sub(9)
w=game.Players:FindFirstChild(player) if w then if w.Character then
w.Character.Torso.Anchored = true w.WalkSpeed =0
end end end
----------------Group--------------

if Msg:sub(1, 10) == "#grouprank" then
local player = Msg:sub(12) w = game.Players:FindFirstChild(player) if w then
if w:IsInGroup(Group) then gui = game.Workspace.Gamert7AdminCommands.Rankgui
a = gui:Clone() a.Parent = Player.PlayerGui
Player.PlayerGui.Rankgui.ra.Text = w:GetRoleInGroup(Group).." " wait(3) Player.PlayerGui.Rankgui:Destroy()

end end end
-------------
if Msg:sub(1, 7) == "#noclip" then
local player = Msg:sub(9) w = game.Players:FindFirstChild(player) if w then
if w.Character then

coroutine.resume(coroutine.create(function()
on = true repeat wait()
human = w.Character human.Torso.CanCollide=false human["Right Arm"].CanCollide=false
human.Head.CanCollide=false human["Left Leg"].CanCollide=false human["Left Arm"].CanCollide=false
human["Right Leg"].CanCollide=false
until on == false
end))
end end end
---------------------Unnolcip
if Msg:sub(1, 9) == "#unnoclip" then on =false
end
-----------------Fire
if Msg:sub(1, 5) == "#fire" then local player = Msg:sub (7)
vi = game.Workspace:FindFirstChild(player)if vi then
q = Instance.new("Fire", vi.Head)
q.Name = "Fire"
q.Heat = 10
q.Size = 5
q.Color = Color3.new(35, 6, 255)
q.SecondaryColor = Color3.new(255, 0, 0)
end end
----
if Msg:sub(1, 7) == "#nofire" then local player = Msg:sub(9)
vi = game.Workspace:FindFirstChild(player) vi.Head.Fire:Destroy()
end
-----
if Msg:sub(1, 9) == "#commands" then
commands = "#commands, #fps gamert7, #nofps gamert7, #showbricks, #closebicks,#noseizure, #seizure, #closecommands, #nofire gamert7, #warn gamert7 6, #fire gamert7, #unnoclip gamert7, #noclip gamert7, #grouprank gamert7,#freeze gamert7, #ungod gamert7, #god gamert7, #visible gamert7, #invisible gamert7, #fullhealth gamert7, #damage gamert7, #restorehealth gamert7, #kick gamert7, #loopkill gamert7, #unloopkill, gamert7, #reset, #insertpartnamehere, #kill gamert7, #remove insertpartnamehere, #pm gamert7"
gui = game.Workspace.Gamert7AdminCommands.Command
a = gui:Clone() a.Parent = Player.PlayerGui
Player.PlayerGui.Command.g.Text = commands..""
end
---
if Msg:sub(1, 9) == "#closecommands" then
Player.PlayerGui.Command:Destroy()
end
---
if Msg:sub(1, 7) == "#remove" then
object = Msg:sub(9) objectt = game.Workspace:FindFirstChild(object, true)
if objectt then objectt:Destroy()
end end
-----------
if Msg:sub(1, 3) == "#pm" then
local Name = Msg:sub(5, Msg:find(" ", 5) - 1)
local Message = Msg:sub(Msg:find(" ", 5) + 1)
for _, Player in pairs(Game.Players:GetPlayers()) do
if Player.Name:lower():find(Name:lower()) then
a =game.Workspace.Gamert7AdminCommands.PM:Clone()
a.Parent = Player.PlayerGui
gui = Player.PlayerGui.PM
Fo = gui.Fo
Fo.Text = Name..": "..Message..""
Fo:TweenPosition(UDim2.new(0, 90, 0, 200), "Out", "Elastic", 3, true)
Fo:TweenSize(UDim2.new(0, 200, 0, 100), "Out", "Elastic", 3, true)

wait(7)
gui:Destroy()

end
end
end
--------Warning System----------------
if Msg:sub(1, 5) == "#warn" then
local Name = Msg:sub(7, Msg:find(" ", 7) - 1)
local Reason = Msg:sub(Msg:find(" ", 7) + 1)
for _, player in pairs (Game.Players:GetPlayers()) do
if player.Name:lower():find(Name:lower()) then
a = Game.Workspace.Gamert7AdminCommands.Warn:Clone()
a.Parent = player.PlayerGui
gui = player.PlayerGui.Warn
gui.Namee.Text = Player.Name..""
gui.Wo.Text = Reason..""
wait(3)
gui:Destroy()


end end end
-------------Seizure--------------
if Msg:sub(1, 8) == "#seizure" then
for _, player in pairs (Game.Players:GetPlayers()) do
b = game.Workspace.Gamert7AdminCommands.Col:Clone() b.Parent = player.PlayerGui
coroutine.resume(coroutine.create(function()
on = true
repeat wait()
gui = player.PlayerGui.Col.Frame
gui.BackgroundColor3 = Color3.new(math.random(),math.random(),math.random())
until on == false
end))
end end
-----
if Msg:sub(1, 10) == "#noseizure" then
for _, player in pairs (Game.Players:GetPlayers()) do
on = false
gui = player.PlayerGui.Col.Frame
gui:Destroy()
end end
--------------FPS-----------
if Msg:sub(1, 4) == "#fps" then
local Name = Msg:sub(Msg:find(" ", 5) + 1)
for _, player in pairs(Game.Players:GetPlayers()) do
if player.Name:lower():find(Name:lower()) then
coroutine.resume(coroutine.create(function()
on = true
repeat wait() if player.CameraMode == "LockFirstPerson" then print("DURR")
else player.CameraMode = "LockFirstPerson" end
until on == false end))
end end end
-----
if Msg:sub(1, 6) == "#nofps" then
local Name = Msg:sub(Msg:find(" ", 7) + 1)
for _, player in pairs(Game.Players:GetPlayers()) do
if player.Name:lower():find(Name:lower()) then
player.CameraMode = "Classic"
on = false
end end end
----------
if Msg:sub(1, 11) == "#showbricks" then
a=Var.Brick:Clone()
a.Parent = Player.PlayerGui
for _, brick in pairs(Game.Workspace:GetChildren()) do
if brick:IsA("Part") then
Workspace.Brok.Value = brick.Name
c= Player.PlayerGui.Brick.Parts
c.Text = Workspace.Brok.Value
b= Player.PlayerGui.Brick
b.Frame:TweenSize(UDim2.new(0, 500, 0, 300), "Out", "Quad", 4, true)
b.Frame:TweenPosition(UDim2.new(0, 400, 0, 100), "Out", "Quad", 4, true)
b.Namer:TweenPosition(UDim2.new(0, 620, 0, 120), "Out", "Quad", 6, true)
b.Parts:TweenSize(UDim2.new(0, 500, 0, 200), "Out", "Quad", 7, true)
b.Parts:TweenPosition(UDim2.new(0, 400, 0, 200), "Out", "Quad", 7, true)
end end end
-------
if Msg:sub(1, 12) == "#closebricks" then
Player.PlayerGui.Brick:Destroy()
end
---
end)
end)
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