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
|
  |
| Joined: 22 Mar 2011 |
| Total Posts: 107 |
|
| |
|
Avocation
|
  |
| Joined: 22 Mar 2011 |
| Total Posts: 107 |
|
| |
|
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
|
  |
| Joined: 22 Mar 2011 |
| Total Posts: 107 |
|
| |
|
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 |
|
|