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
 

[ Content Deleted ]

Previous Thread :: Next Thread 
stipess is not online. stipess
Joined: 11 May 2011
Total Posts: 2018
15 Jul 2013 07:53 PM
So this script just doesn't work, it's in a part, and it's a local script


-- Made completely by stipess

Allowed = playername -- Put the names of people you want to be able to pass

function Ontouch(player)
script.Parent.FindFirstChild(Humanoid)
if Humanoid and player.Name == Allowed then
script.Parent.CanCollide = false
script.Parent.Transparency = 0.4
wait(2)
script.Parent.CanCollide = true
script.Parent.Transparency = 0
end
end
script.Parent.Touched:connect(Ontouch)
Report Abuse
DrWaffler is not online. DrWaffler
Joined: 16 Sep 2011
Total Posts: 4248
15 Jul 2013 07:54 PM
The problem is that it is in a local script, put it in a regular script, and run it.

Love me? Find me on Twitter! @DrWafflerRBLX
Report Abuse
CodyTheBuildingKid is not online. CodyTheBuildingKid
Joined: 13 Dec 2011
Total Posts: 4399
15 Jul 2013 07:55 PM
Should be script.Parent:FindFirstChild("Humanoid") findFirstChild is used with the name of the part you're trying to find.
Report Abuse
18cwatford is not online. 18cwatford
Joined: 08 Oct 2009
Total Posts: 5410
15 Jul 2013 07:56 PM
"Allowed = playername -- Put the names of people you want to be able to pass"

Maybe its the fact that playername isn't a string.

Second, it's :FindFirstChild, not .FindFirstChild (It's a : not a .)
Third, Humanoid isn't defined
Fourth FindFirstChild need a string, not an instance, which in this case is nil.
Report Abuse
stipess is not online. stipess
Joined: 11 May 2011
Total Posts: 2018
15 Jul 2013 07:58 PM
How do you mean Humanoid isn't defined?
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
15 Jul 2013 07:58 PM
[ Content Deleted ]
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
15 Jul 2013 07:59 PM
[ Content Deleted ]
Report Abuse
foreverpower is not online. foreverpower
Joined: 05 Feb 2011
Total Posts: 5578
15 Jul 2013 07:59 PM
Allowed = "playername" -- You need " "around the name

function Ontouch(player)
script.Parent.FindFirstChild("Humanoid") -- You need "" around humanoid
if Humanoid and player.Name == Allowed then
script.Parent.CanCollide = false
script.Parent.Transparency = 0.4
wait(2)
script.Parent.CanCollide = true
script.Parent.Transparency = 0
end
end
script.Parent.Touched:connect(Ontouch)
Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
15 Jul 2013 08:00 PM
[ Content Deleted ]
Report Abuse
18cwatford is not online. 18cwatford
Joined: 08 Oct 2009
Total Posts: 5410
15 Jul 2013 08:02 PM
"How do you mean Humanoid isn't defined?"
Humanoid isn't defined.

>18cwat
>findFirstChild***

No, it can be either FindFirstChild or findFirstChild, but their not making camelCase methods anymore.

"Humanoid isnt find because of your mistake before it the findFirstChild one"
What he needs to do is this;

Humanoid = script.Parent:FindFirstChild("Humanoid")

Report Abuse
baheeg is not online. baheeg
Joined: 19 Jul 2010
Total Posts: 72846
15 Jul 2013 08:03 PM
[ Content Deleted ]
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