|
| 09 Nov 2014 07:01 AM |
Door =game.Workspace.Door function touched(part) if game.Players:GetPlayerFromCharacter(part.Parent) then local plr=game.Players:GetPlayerFromCharacter(part.Parent) Door.Transparency = 0.5 Door.Cancollide = false wait(5) Door.Transparency = 0 Door.Cancollide = true end
end
script.Parent.Touched:connect(touched)
It is: a door that opens when its touched for 5secs its errors: -Remains transparent -Doesnt become false cancollide(aka wont become walktrough) |
|
|
| Report Abuse |
|
|
sarim786
|
  |
| Joined: 02 Oct 2011 |
| Total Posts: 206 |
|
|
| 09 Nov 2014 07:11 AM |
You made a mistake, I think, I'm a beginner scripter
Door = game.Workspace.Door function onTouched(part) if game.Players:GetPlayerFromCharacter(part.Parent) then local plr=game.Players:GetPlayerFromCharacter(part.Parent) Door.Transparency = 0.5 Door.Cancollide = false wait(5) Door.Transparency = 0 Door.Cancollide = true
end
end
script.Parent.Touched:connect(touched)
|
|
|
| Report Abuse |
|
|
|
| 10 Nov 2014 11:01 AM |
Door = game.Workspace.Door function onTouched(part) if game.Players:GetPlayerFromCharacter(part.Parent) then local plr=game.Players:GetPlayerFromCharacter(part.Parent) Door.Transparency = 0.5 Door.Cancollide = false wait(5) Door.Transparency = 0 Door.Cancollide = true
end
end
script.Parent.Touched:connect(onTouched)
Doesnt work. It remains transparent and wong become false canccollide. |
|
|
| Report Abuse |
|
|
OzzyFin
|
  |
| Joined: 07 Jun 2011 |
| Total Posts: 3600 |
|
|
| 10 Nov 2014 11:21 AM |
Do
function touched(part) print(part,part.Parent)
If it prints "Handle" then your gear's or hat's Handle touches it and it won't go on because there is no Player for Character called, for example "Hat". |
|
|
| Report Abuse |
|
|
|
| 10 Nov 2014 11:24 AM |
| Sarim, onTouched does nothing. It is just the wiki's lame habit of confusing you. He had it correct the first time. You could name it anything you want, technically. |
|
|
| Report Abuse |
|
|
|
| 10 Nov 2014 12:49 PM |
"Door =game.Workspace.Door"
Make sure you put a space after the equals (=)
So it's then Door = game.Workspace.Door |
|
|
| Report Abuse |
|
|
Raidorz
|
  |
| Joined: 28 Apr 2011 |
| Total Posts: 5221 |
|
|
| 10 Nov 2014 01:01 PM |
Change CanCollide = false and Transparency = 1
Also, is this gonna be a single player RPG? |
|
|
| Report Abuse |
|
|
|
| 14 Nov 2014 08:52 AM |
| Going to make a game, yes. Its going to be as Evolve Alpha(changed idea to it) |
|
|
| Report Abuse |
|
|