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: Help with scripting shirts

Previous Thread :: Next Thread 
Wimpy1 is not online. Wimpy1
Joined: 25 Oct 2009
Total Posts: 20
23 Jan 2012 11:32 PM
How do i script a shirt so when people buy the shirt they get admin powers? i know how to script admin and add people on to the admin list
Report Abuse
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
24 Jan 2012 12:47 AM
shirt = {######} --Replace "######" with a number

function onPlayerAdded(player)
if player:findFirstChild("ShirtGraphic") then
if player.ShirtGraphic:IsA("ShirtGraphic") then
for _,value in pairs(shirt) do
if player.ShirtGraphic.Texture = "http://www.roblox.com/asset/?id="..value then
...
end
end
end
end
end

game.Players:PlayerAdded:connect(onPlayerAdded)
Report Abuse
cheatmaster18 is not online. cheatmaster18
Joined: 29 Oct 2010
Total Posts: 1871
24 Jan 2012 12:49 AM
I made a mistake, here is the new script:

shirt = {######} --Replace "######" with a number

function onPlayerAdded(player)
if player:findFirstChild("ShirtGraphic") then
if player.ShirtGraphic:IsA("ShirtGraphic") then
for _,value in pairs(shirt) do
if player.ShirtGraphic.Graphic = "http://www.roblox.com/asset/?id="..value then
...
end
end
end
end
end

game.Players:PlayerAdded:connect(onPlayerAdded)
Report Abuse
blueymaddog is not online. blueymaddog
Joined: 23 Sep 2009
Total Posts: 5459
24 Jan 2012 02:37 AM
@cheat you just have to complicate things :P
this script will work if the person has the shirt even if they aren't wearing it:

local shirt = ###### --Replace "######" with a number

function onPlayerAdded(player)
if (game:GetService("BadgeService"):UserHasBadge(shirt,player.userId)) then
...
end
end

game.Players:PlayerAdded:connect(onPlayerAdded)
Report Abuse
Wimpy1 is not online. Wimpy1
Joined: 25 Oct 2009
Total Posts: 20
15 Feb 2012 10:06 PM
ok guys thx i will use that when i get bc again to script shirts
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