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: Script does not work

Previous Thread :: Next Thread 
Avocation is not online. Avocation
Joined: 22 Mar 2011
Total Posts: 107
19 Aug 2014 03:57 PM
For some reason when you touch it, nothing happens.
The script is NOT disabled so what is the problem?

function OnTouch(part)
local human = part.Parent:findFirstChild("Humanoid")
if (human ~= nil ) then
if part.Parent.Name == script.Parent.Parent.OwnerName.Value then
script.Parent.CanCollide = true
wait(3)
script.Parent.CanCollide = false
elseif part.Parent.Name ~= script.Parent.Parent.OwnerName.Value then
print("You are not the owner of this tycoon!")
end
end
end

script.Parent.Touched:connect(OnTouch)
Report Abuse
Avocation is not online. Avocation
Joined: 22 Mar 2011
Total Posts: 107
19 Aug 2014 06:16 PM
Bump
Report Abuse
Avocation is not online. Avocation
Joined: 22 Mar 2011
Total Posts: 107
19 Aug 2014 06:22 PM
Bump
Report Abuse
devMe is not online. devMe
Joined: 28 Jun 2014
Total Posts: 155
19 Aug 2014 06:23 PM
Is it in a LocalScript? If it is, it wont work.


~devMe~
Report Abuse
Avocation is not online. Avocation
Joined: 22 Mar 2011
Total Posts: 107
19 Aug 2014 06:30 PM
It's a normal script
Report Abuse
Avocation is not online. Avocation
Joined: 22 Mar 2011
Total Posts: 107
20 Aug 2014 10:29 AM
I figured it out, the frame of the door was a solid model and you can't walk through solid models unless cancollide = false.
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