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: Any help will be great

Previous Thread :: Next Thread 
InternetGuy is not online. InternetGuy
Joined: 28 Apr 2010
Total Posts: 3385
08 Sep 2013 12:02 PM
This runs perfectly fine in Script builder,
I've implemented this very simple admin command thing.
However, when I respawn, I have to re-run it..
Any help?
Thanks.
(I know, I'm bad at keeping it neat)
--
player = game.Players:WaitForChild("InternetGuy")
char = workspace:WaitForChild("InternetGuy")
version = "v1.0.0"
chatBubble = false
currentColor = Enum.ChatColor.Blue
blue = Enum.ChatColor.Blue
red = Enum.ChatColor.Red
green = Enum.ChatColor.Green
godMode = false
function onChat(msg, player)
if chatBubble == true then
game:GetService("Chat"):Chat(char.Head, msg, currentColor)
end

if msg == "!reset" then
char.Torso:Remove()
elseif msg == "!cb" then
chatBubble = true
elseif msg == "!ncb" then
chatBubble = false
elseif msg == "!color red" then
currentColor = red
elseif msg == "!color blue" then
currentColor = blue
elseif msg == "!color green" then
currentColor = green
elseif msg == "!gm" then
godMode = true
elseif string.sub(msg,1,2) == "!m" then
m = Instance.new("Message", workspace)
m.Text = "[Admin] InternetGuy: " ..string.sub(msg,3)
wait(3)
m:Remove()
end
end



player.Chatted:connect(onChat)
Report Abuse
InternetGuy is not online. InternetGuy
Joined: 28 Apr 2010
Total Posts: 3385
08 Sep 2013 12:06 PM
Eh
Report Abuse
InternetGuy is not online. InternetGuy
Joined: 28 Apr 2010
Total Posts: 3385
08 Sep 2013 12:09 PM
Mehhh D:
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
08 Sep 2013 12:14 PM
-- May not work.
player = game.Players:WaitForChild("InternetGuy")
char = workspace:WaitForChild("InternetGuy")
version = "v1.0.0"
chatBubble = false
currentColor = Enum.ChatColor.Blue
blue = Enum.ChatColor.Blue
red = Enum.ChatColor.Red
green = Enum.ChatColor.Green
godMode = false
function onChat(msg, player)
if chatBubble == true then
game:GetService("Chat"):Chat(char.Head, msg, currentColor)
end

if msg == "!reset" then
char.Torso:Remove()
elseif msg == "!cb" then
chatBubble = true
elseif msg == "!ncb" then
chatBubble = false
elseif msg == "!color red" then
currentColor = red
elseif msg == "!color blue" then
currentColor = blue
elseif msg == "!color green" then
currentColor = green
elseif msg == "!gm" then
godMode = true
elseif string.sub(msg,1,2) == "!m" then
m = Instance.new("Message", workspace)
m.Text = "[Admin] InternetGuy: " ..string.sub(msg,3)
wait(3)
m:Remove()
end
end

function respawn(c)
c.Humanoid.Died:connect(function()
player:LoadCharacter() -- Let's cut to the chase and respawn immediately.
char = player.Character
respawn(char)
end)
end
respawn(char) -- Inception may cause error.
Report Abuse
InternetGuy is not online. InternetGuy
Joined: 28 Apr 2010
Total Posts: 3385
08 Sep 2013 12:38 PM
Didnt work
:L
Report Abuse
warman50000 is not online. warman50000
Joined: 29 Dec 2008
Total Posts: 1055
08 Sep 2013 12:41 PM
game.Workspace:WaitForChild("InternetGuy")
Report Abuse
InternetGuy is not online. InternetGuy
Joined: 28 Apr 2010
Total Posts: 3385
08 Sep 2013 12:47 PM
@War,
That makes no difference.
Workspace
and game.Workspace
are the same.
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