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: If player has a T-Shirt?

Previous Thread :: Next Thread 
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
17 Aug 2014 04:51 PM
I'm making a game that you click as many times as possible in ten seconds, and after you click, it will award points. If you have the T-Shirt, I want it to award 1.5 times as many points. How would I modify this script to do that?

local PointsService = Game:GetService("PointsService")

if script.Parent.Parent.Parent.Parent.Parent:HasItem(164792610)
local value = script.Value*1.5
else
local value = script.Value
local pointsToAward = PointsService:GetAwardablePoints()
local universeBalance = PointsService:GetGamePointBalance(player.userId)
if ( pointsToAward > 0 and universeBalance == 0) then

pcall(function()
PointsService:AwardPoints(player.userId, value)
end)
end
end)



If you look closely, I don't give a crap.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
17 Aug 2014 05:04 PM
HELP PLEASE

If you look closely, I don't give a crap.
Report Abuse
Goodis is not online. Goodis
Joined: 14 Jan 2010
Total Posts: 253
17 Aug 2014 05:10 PM


it=shirtidhere;
Players=game:service[[Players]]:players();
game.Players.DescendantAdded:connect(functio(Ph)
for a=1,#Players do
if(game.Players:FindFirstChild(a[i].Name).Character
Shirt.ShirtTemplate='rbxassetid://'..it)then
-- pp stuff
end;end;end);
Report Abuse
EPICJAKEISCOOL is not online. EPICJAKEISCOOL
Joined: 07 Feb 2013
Total Posts: 1756
17 Aug 2014 05:11 PM
By the way, GamePasses are more efficient.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
17 Aug 2014 05:11 PM
@Epic,
I don't have the money for gamepasses atm.

If you look closely, I don't give a crap.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
17 Aug 2014 05:13 PM
Goodis, that wouldn't work because the player wouldn't necessarily have the t-shirt.

If you look closely, I don't give a crap.
Report Abuse
Goodis is not online. Goodis
Joined: 14 Jan 2010
Total Posts: 253
17 Aug 2014 05:15 PM
I am on mobile, untested, and it finds that template; if they are not wearing it then they get no special privilegese
Report Abuse
Goodis is not online. Goodis
Joined: 14 Jan 2010
Total Posts: 253
17 Aug 2014 05:15 PM
*they do get spyecial privileges
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
17 Aug 2014 05:17 PM
wat

If you look closely, I don't give a crap.
Report Abuse
Distortional is not online. Distortional
Joined: 22 Nov 2011
Total Posts: 6530
17 Aug 2014 05:24 PM
bump...

If you look closely, I don't give a crap.
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