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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: This script isn't working!

Previous Thread :: Next Thread 
jameswizard8 is not online. jameswizard8
Joined: 24 Jan 2010
Total Posts: 5405
11 Apr 2012 05:05 PM
texture = "http://www.roblox.com/asset/?id=77210434"

function enter(newPlayer)
repeat wait() until newPlayer.Character ~= nil
if (newPlayer.Torso.Shirt Graphic.Graphic == texture) then

newPlayer.Humanoid.Walkspeed = 23

end

game.Players.ChildAdded:connect(enter)

for i, v in pairs(game.Players:GetChildren()) do
enter(v)
end

-----------

I've tried tweaking it and I'm still not able to fix it.

Could I have some help, guys?

~★That, sir, is why we live in a world full of morons★~
Report Abuse
jameswizard8 is not online. jameswizard8
Joined: 24 Jan 2010
Total Posts: 5405
11 Apr 2012 05:06 PM
Please help!

~★That, sir, is why we live in a world full of morons★~
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
11 Apr 2012 05:07 PM
newPlayer.Character.Humanoid.WalkSpeed

† KMXD †
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
11 Apr 2012 05:07 PM
"if (newPlayer.Torso.Shirt Graphic.Graphic == texture) then"

You've got to be kidding me...

repeat wait() until newPlayer.Character.Torso:FindFirstChild("Shirt Graphic")
if (newPlayer.Character.Torso["Shirt Graphic"].Graphic == texture) then
Report Abuse
jameswizard8 is not online. jameswizard8
Joined: 24 Jan 2010
Total Posts: 5405
11 Apr 2012 05:09 PM
@MrNicNac No need to be harsh, I'm a beginner scripter scraping information off the wiki.

~★That, sir, is why we live in a world full of morons★~
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
11 Apr 2012 05:10 PM
Aaaaaand:

newPlayer.Character.Humanoid.WalkSpeed


† KMXD †
Report Abuse
jameswizard8 is not online. jameswizard8
Joined: 24 Jan 2010
Total Posts: 5405
11 Apr 2012 05:10 PM
@MrNicNac Did you mean Torso.["ShirtGraphic"].

Or did you do Torso["ShirtGraphic"]. on purpose?

~★That, sir, is why we live in a world full of morons★~
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
11 Apr 2012 05:10 PM
Hmm...wasn't trying to be harsh. Just thought that most beginners would have read that scripts can't have spaces in a line of raw code. You wouldn't name a variable like:

local hi you = "Hello"
Report Abuse
MrNicNac is not online. MrNicNac
Joined: 29 Aug 2008
Total Posts: 26567
11 Apr 2012 05:11 PM
"Or did you do Torso["ShirtGraphic"]. on purpose?"

I did it the way I did on purpose. It's called indexing.
Report Abuse
jameswizard8 is not online. jameswizard8
Joined: 24 Jan 2010
Total Posts: 5405
11 Apr 2012 05:12 PM
@MrNicNac Oh, okay, I'll keep that in mind. Thanks.

@Knightmare Thanks.

~★That, sir, is why we live in a world full of morons★~
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
11 Apr 2012 05:13 PM
No problem.

† KMXD †
Report Abuse
jameswizard8 is not online. jameswizard8
Joined: 24 Jan 2010
Total Posts: 5405
11 Apr 2012 05:23 PM
Guys, I've done everything you said and it still doesn't work D:

texture = "http://www.roblox.com/asset/?id=77210434"

function enter(newPlayer)
repeat wait() until newPlayer.Character.Torso:FindFirstChild("Shirt Graphic")
if (newPlayer.Character.Torso["Shirt Graphic"].Graphic == texture) then

newPlayer.Character.Humanoid.WalkSpeed = 23

end

game.Players.ChildAdded:connect(enter)

for i, v in pairs(game.Players:GetChildren()) do
enter(v)
end

~★That, sir, is why we live in a world full of morons★~
Report Abuse
jameswizard8 is not online. jameswizard8
Joined: 24 Jan 2010
Total Posts: 5405
11 Apr 2012 05:25 PM
:(

~★That, sir, is why we live in a world full of morons★~
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
11 Apr 2012 05:27 PM
texture = "http://www.roblox.com/asset/?id=77210434"

Game.Players.PlayerAdded:connect(function(newPlayer)
repeat wait() until newPlayer.Character.Torso:FindFirstChild("Shirt Graphic")
if (newPlayer.Character.Torso["Shirt Graphic"].Graphic == texture) then
newPlayer.Character.Humanoid.WalkSpeed = 23
end
end)

† KMXD †
Report Abuse
jameswizard8 is not online. jameswizard8
Joined: 24 Jan 2010
Total Posts: 5405
11 Apr 2012 05:29 PM
@Knightmare Thanks, but just one quick question before I test this, weren't you meant to spell game like this:

game.Players

Not like this?:

Game.Players

~★That, sir, is why we live in a world full of morons★~
Report Abuse
Phellem is not online. Phellem
Joined: 04 Aug 2011
Total Posts: 1984
11 Apr 2012 05:30 PM
local texture = "http://www.roblox.com/asset/?id=77210434"



game.Players.PlayerAdded:connect(function(newPlayer)
repeat wait() until newPlayer.Character
repeat wait() until newPlayer.Character:FindFirstChild("Shirt Graphic")
if newPlayer.Character["Shirt Graphic"].Graphic == texture then
newPlayer.Character.Humanoid.WalkSpeed = 23
end
end)



I'm pretty sure Shirt Graphic are in the Character.
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
11 Apr 2012 05:30 PM
No, I meant "Game".

† KMXD †
Report Abuse
Phellem is not online. Phellem
Joined: 04 Aug 2011
Total Posts: 1984
11 Apr 2012 05:33 PM
Isn't game.Players and Game.Players the same...
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
11 Apr 2012 05:33 PM
Pretty much. And phellem, I don't think ShirGraphic is in the Character.

† KMXD †
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
11 Apr 2012 05:35 PM
Juuuuuuust kidding. Phellem is correct.

† KMXD †
Report Abuse
Phellem is not online. Phellem
Joined: 04 Aug 2011
Total Posts: 1984
11 Apr 2012 05:35 PM
I checked. It was.

Here is the code if you want to test offline:

local texture = "http://www.roblox.com/asset/?id=77210434"

function entered(newPlayer)
repeat wait() until newPlayer.Character
repeat wait() until newPlayer.Character:FindFirstChild("Shirt Graphic")
if newPlayer.Character["Shirt Graphic"].Graphic == texture then
newPlayer.Character.Humanoid.WalkSpeed = 23
end
end

game.Players.PlayerAdded:connect(entered)

for i, v in pairs(game.Players:GetChildren()) do
enter(v)
end
Report Abuse
jameswizard8 is not online. jameswizard8
Joined: 24 Jan 2010
Total Posts: 5405
11 Apr 2012 05:35 PM
Phellem's script actually worked...

Thanks to all of you guys for contributing, I'll give credit to you.

~★That, sir, is why we live in a world full of morons★~
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
11 Apr 2012 05:35 PM
I was thinking of the "roblox" decal in the torso. Pretty much the same thing...

† KMXD †
Report Abuse
CwalkR is not online. CwalkR
Joined: 09 Apr 2012
Total Posts: 25
11 Apr 2012 05:39 PM
game.Players.PlayerAdded:connect(function(newPlayer)
newPlayer.CharacterAdded:connect(function(newChar)
if (newChar.Torso["Shirt Graphic"].Graphic == "http://www.roblox.com/asset/?id=77210434") then
newChar.Humanoid.Walkspeed = 23
else return end
end)
end)
Report Abuse
jameswizard8 is not online. jameswizard8
Joined: 24 Jan 2010
Total Posts: 5405
11 Apr 2012 07:54 PM
We've got a problem. When I respawn, it stops working.

~★That, sir, is why we live in a world full of morons★~
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