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: Script to...

Previous Thread :: Next Thread 
wolfhunterbear is not online. wolfhunterbear
Joined: 12 Mar 2011
Total Posts: 1082
17 May 2013 08:00 PM
--Ok, so.. I want this script to take certain player names and when they spawn.. change (Humanoid) to "Game"

I got so far.

Game = (wolfhunterbear" , "baconmon" , "Randomdude1111")

game.Workspace.Game.Humanoid.Name = "Game"

end

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

Simplified version,

game.workspace.Wolfhunterbear.Humanoid.Name = Game

end

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

I want this to happen whenever certain name/s respawn/ enter the game.
Basically like an admin script.
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
17 May 2013 08:02 PM
local admins = {"azarth", "player1", "human", "iowntreese"}


game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(character)
repeat wait() until p
for i = 1, #admins do
if p.Name:lower() == admins[i] then
character.Humanoid.Name = "Game"
end
end
end)
end)
Report Abuse
wolfhunterbear is not online. wolfhunterbear
Joined: 12 Mar 2011
Total Posts: 1082
17 May 2013 08:04 PM
Tyvm :)
Really appreciate.
Report Abuse
wolfhunterbear is not online. wolfhunterbear
Joined: 12 Mar 2011
Total Posts: 1082
17 May 2013 08:22 PM
Err, actually.. script doesn't work.
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
17 May 2013 08:23 PM
Worked for me.
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
17 May 2013 08:24 PM
Make sure the names in the table are lowercased.
Report Abuse
wolfhunterbear is not online. wolfhunterbear
Joined: 12 Mar 2011
Total Posts: 1082
17 May 2013 08:26 PM
this script is a local script and goes in workspace correct?
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
17 May 2013 08:27 PM
The script is a normal script that goes in workspace. The names in the table must be lowercase.
Report Abuse
wolfhunterbear is not online. wolfhunterbear
Joined: 12 Mar 2011
Total Posts: 1082
17 May 2013 08:33 PM
what I have in my workspace
-------------------
Script
---------
local admins = {"azarth", "wolfhunterbear", "human", "iowntreese"}


game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(character)
repeat wait() until p
for i = 1, #admins do
if p.Name:lower() == admins[i] then
character.Humanoid.Name = "GM"
end
end
end)
end)

--------------------------
I changed Game to GM
Report Abuse
wolfhunterbear is not online. wolfhunterbear
Joined: 12 Mar 2011
Total Posts: 1082
17 May 2013 08:35 PM
Got it working, just doesn't work in solo mode. I took an electric fence and changed Humanoid to GM to see if it would kill me, it did. Tyvm for your patience :)
Report Abuse
Azarth is not online. Azarth
Joined: 17 Aug 2012
Total Posts: 2760
17 May 2013 08:36 PM
Yup, works fine for me..
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