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 » Scripters
Home Search
 

Re: Is this possible?

Previous Thread :: Next Thread 
Zeje is not online. Zeje
Joined: 20 Feb 2014
Total Posts: 1452
18 Jul 2016 01:46 PM
Looking for a script that kicks you from a game if you don't have on a specific tshirt.

Can anyone toss a free model script at me thats like this or something? Thank you~


Report Abuse
robomax11 is not online. robomax11
Joined: 07 Jul 2011
Total Posts: 6828
18 Jul 2016 01:48 PM
if own shirt then
plr:Kick('dont own this shirt')
end

R$6,227 | 39,365
Report Abuse
Zeje is not online. Zeje
Joined: 20 Feb 2014
Total Posts: 1452
18 Jul 2016 01:50 PM
So where would the shirt ID go in there?


Report Abuse
Smeers is not online. Smeers
Joined: 14 Feb 2013
Total Posts: 797
18 Jul 2016 01:52 PM
local ms = game:GetService("MarketplaceService")
local itemID = 0

game.Players.PlayerAdded:connect(function(player)
if not ms:PlayerOwnsAsset(player,itemID) then
player:Kick("You don't own the item needed to play!"
end
end)

-- Script in workspace/serverscriptservice
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
18 Jul 2016 01:54 PM
local shirtId = 'http://www.roblox.com/asset/?id=114722068'

HasShirt = function(torso)
for i,v in next, torso:GetChildren() do
if v:IsA('Decal') then
return v
end
end
end

game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
player.CharacterAppearanceLoaded:connect(function()
local shirt = HasShirt(char.Torso)
if shirt and not shirt.Texture == shirtId then
player:Kick()
end
end)
end)
end)


Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
18 Jul 2016 01:55 PM
@Smeers that check if the player owns the asset, not if he has it on.


Report Abuse
Zeje is not online. Zeje
Joined: 20 Feb 2014
Total Posts: 1452
18 Jul 2016 01:57 PM
None of them are working..


Report Abuse
Zeje is not online. Zeje
Joined: 20 Feb 2014
Total Posts: 1452
18 Jul 2016 02:01 PM
bump


Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
18 Jul 2016 02:03 PM
if shirt and shirt.Texture ~= shirtId then
player:Kick()
end

*


Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
18 Jul 2016 02:04 PM
Actually i just forgot the parenthesis in my original script.

if shirt and not (shirt.Texture == shirtId) then
player:Kick()
end

There you go. Have fun with your freebie.


Report Abuse
Zeje is not online. Zeje
Joined: 20 Feb 2014
Total Posts: 1452
18 Jul 2016 02:05 PM
I guess I should re-word this...

Can someone make a script that would kick someone if they didn't HAVE ON T-Shirt ID 218471695 ???


Report Abuse
Zeje is not online. Zeje
Joined: 20 Feb 2014
Total Posts: 1452
18 Jul 2016 02:07 PM
Still not working :/


Report Abuse
DinoSal is not online. DinoSal
Joined: 24 Oct 2013
Total Posts: 1117
18 Jul 2016 02:14 PM
game.Players.PlayerAdded:connect(function(plr)
wait(1)
local player = plr.Character
if player:FindFirstChild("Shirt Graphic") then
if player:FindFirstChild("Shirt Graphic").Graphic ~= "http://www.roblox.com/asset/?id=IDHERE" then
player:remove()
end
end
end)


Report Abuse
Zeje is not online. Zeje
Joined: 20 Feb 2014
Total Posts: 1452
19 Jul 2016 03:21 PM
:|


Report Abuse
DinoSal is not online. DinoSal
Joined: 24 Oct 2013
Total Posts: 1117
19 Jul 2016 05:11 PM
mine should work... i tested it


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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