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..VIP.

Previous Thread :: Next Thread 
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
08 Jan 2012 02:34 PM
http://www.roblox.com/Poor-VIP-item?id=69664298
Thats my T-shirt texture ID...
print ("VIP T-Shirt Door Script Loaded")

-- list of account names allowed to go through the door.
permission = { "YourNameHere" } -- This is how many people can still get through, so u don't have to change shirts. You can also have another friend here.

-- TextureId of the VIP shirt.
texture = "http://www.roblox.com/Poor-VIP-item?id=69664298"
function checkOkToLetIn(name)
for i = 1,#permission do
-- convert strings to all upper case, otherwise we will let in
-- "Username" but not "username" or "uSERNAME"
if (string.upper(name) == string.upper(permission[i])) then return true end
end
return false
end

local Door = script.Parent

function onTouched(hit)
print("Door Hit")
local human = hit.Parent:findFirstChild("Humanoid")
if (human ~= nil ) then
if human.Parent.Torso.roblox.Texture == texture then --the shirt
Door.Transparency = 0.7
Door.CanCollide = false
wait(4) -- this is how long the door is open
Door.CanCollide = true
Door.Transparency = 0
-- a human has touched this door!
print("Human touched door")
-- test the human's name against the permission list
elseif (checkOkToLetIn(human.Parent.Name)) then
print("Human passed test")
Door.Transparency = 0.7
Door.CanCollide = false
wait(4) -- this is how long the door is open
Door.CanCollide = true
Door.Transparency = 0
else human.Health = 0 -- delete this line of you want a non-killing VIP door
end
end
end

script.Parent.Touched:connect(onTouched)

Thats the wiki script Script.
Could someone help? Please? Show me what the problem is? thx
Report Abuse
CrazyBananaMonkey is not online. CrazyBananaMonkey
Joined: 10 Nov 2009
Total Posts: 1599
08 Jan 2012 02:39 PM
-- list of account names allowed to go through the door.
permission = { "YourNameHere" } -- This is how many people can still get through, so u don't have to change shirts. You can also have another friend here.

-- TextureId of the VIP shirt.
texture = "http://www.roblox.com/asset/?id=69664297" -- Change shirt ID to asset
function checkOkToLetIn(name)
for i = 1,#permission do
-- convert strings to all upper case, otherwise we will let in
-- "Username" but not "username" or "uSERNAME"
if (string.upper(name) == string.upper(permission[i])) then return true end
end
return false
end

local Door = script.Parent

function onTouched(hit)
print("Door Hit")
local human = hit.Parent:findFirstChild("Humanoid")
if (human ~= nil ) then
if human.Parent.Torso.roblox.Texture == texture then --the shirt
Door.Transparency = 0.7
Door.CanCollide = false
wait(4) -- this is how long the door is open
Door.CanCollide = true
Door.Transparency = 0
-- a human has touched this door!
print("Human touched door")
-- test the human's name against the permission list
elseif (checkOkToLetIn(human.Parent.Name)) then
print("Human passed test")
Door.Transparency = 0.7
Door.CanCollide = false
wait(4) -- this is how long the door is open
Door.CanCollide = true
Door.Transparency = 0
else human.Health = 0 -- delete this line of you want a non-killing VIP door
end
end
end

script.Parent.Touched:connect(onTouched)
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
08 Jan 2012 02:40 PM
WAIT scratch the
http://www.roblox.com/Poor-VIP-item?id=69664298
Its actually
http://www.roblox.com/Poor-VIP-item?id=69666504
Sorry...

Report Abuse
CrazyBananaMonkey is not online. CrazyBananaMonkey
Joined: 10 Nov 2009
Total Posts: 1599
08 Jan 2012 02:45 PM
Don't start out copying a hard script from the wiki if you don't understand the basics. Here you go, anyways, and you can search around on how to convert your shirt into an asset:

-- list of account names allowed to go through the door.
permission = { "YourNameHere" } -- This is how many people can still get through, so u don't have to change shirts. You can also have another friend here.

-- TextureId of the VIP shirt.
texture = "http://www.roblox.com/asset/?id=69666503" -- Change shirt ID to asset
function checkOkToLetIn(name)
for i = 1,#permission do
-- convert strings to all upper case, otherwise we will let in
-- "Username" but not "username" or "uSERNAME"
if (string.upper(name) == string.upper(permission[i])) then return true end
end
return false
end

local Door = script.Parent

function onTouched(hit)
print("Door Hit")
local human = hit.Parent:findFirstChild("Humanoid")
if (human ~= nil ) then
if human.Parent.Torso.roblox.Texture == texture then --the shirt
Door.Transparency = 0.7
Door.CanCollide = false
wait(4) -- this is how long the door is open
Door.CanCollide = true
Door.Transparency = 0
-- a human has touched this door!
print("Human touched door")
-- test the human's name against the permission list
elseif (checkOkToLetIn(human.Parent.Name)) then
print("Human passed test")
Door.Transparency = 0.7
Door.CanCollide = false
wait(4) -- this is how long the door is open
Door.CanCollide = true
Door.Transparency = 0
else human.Health = 0 -- delete this line of you want a non-killing VIP door
end
end
end

script.Parent.Touched:connect(onTouched)
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