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: Old Fashioned VIP Door not Working

Previous Thread :: Next Thread 
pokemonrrg is not online. pokemonrrg
Joined: 18 Nov 2008
Total Posts: 206
07 Sep 2014 12:40 AM
I have an old book on learning to script. I can't find my error, but maybe you guys can? The door doesn't let me in OR kill me. It's like it's just a brick.

local Door = script.Parent --Declare the part as Door

function onTouch(Brick) --Sets the start of our function and when triggered it gives brick, the object that was hit

local Player = Brick.Parent:findFirstChild("Humanoid") --Finds Humanoid in Brick

if (Player ~= nil) then --Checks if Player is a real Player

if Player.Parent.Torso.roblox.Texture == "http://www.roblox.com/asset/?
version=1&id=10339101" then

Door.CanCollide = false

Door.Transparency = 0.5

Door.BrickColor = BrickColor:Random()

wait(2)

Door.CanCollide = true

Door.Transparency = 0

Door.BrickColor = BrickColor:Random()

else Player.Health = 0

Door.Touched:connect(onTouch)

end
end
end


Sorry I can't say which line, it doesn't say that there is any error.

~Amongst the Shadows~
Report Abuse
LemmJuice is not online. LemmJuice
Joined: 23 Feb 2014
Total Posts: 866
07 Sep 2014 12:47 AM
You are using a decal instead of the shirt object.
Report Abuse
KOTwarrior is not online. KOTwarrior
Joined: 13 Jun 2012
Total Posts: 4376
07 Sep 2014 12:50 AM
-- I hated that script, so I wrote you a new one.
-- With this, they don't need to wear the t-shirt.

local serv = game:FindService("MarketplaceService");
local id = 10339102;

script.Parent.Touched:connect(function(data)
if data.Parent:FindFirstChild("Humanoid") == true then
local plr = game.Players:GetPlayerFromCharacter(data.Parent);
if(serv:PlayerOwnsAsset(plr, id)) then
script.Parent.CanCollide = false;
script.Parent.Transparency = 0.5;
script.Parent.BrickColor = BrickColor.Random();
wait(2);
script.Parent.CanCollide = true;
script.Parent.Transparency = 0;
script.Parent.BrickColor = BrickColor.Random();
else data.Parent:BreakJoints();
end
end
end)
Report Abuse
pokemonrrg is not online. pokemonrrg
Joined: 18 Nov 2008
Total Posts: 206
07 Sep 2014 12:52 AM
There's no way to fix it? I'm trying to learn, not make a game.

~Amongst the Shadows~
Report Abuse
LemmJuice is not online. LemmJuice
Joined: 23 Feb 2014
Total Posts: 866
07 Sep 2014 01:02 AM
That script that guy just posted, is the recommened way now. Just look through and see how it works, that's how I started learning.
Report Abuse
TheLazy0ne is not online. TheLazy0ne
Joined: 04 Sep 2014
Total Posts: 7
07 Sep 2014 01:07 AM
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
print "you haz no skrapting skills"
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