|
| 07 Apr 2015 03:21 PM |
local Door = script.Parent
function OnTouched (Player) local Player = Player.Parent:findfirstChild("Humanoid") if (player) ~= nil then if Player.Parent.Torso.Texture == http://www.robloc.com/asset/?version=&id=1028594 then Door.Cancollide = false Door.Transparency 0.5 wait (3) Door.CanCollide = true Door.Transparency = 0 else Player.health = 0 end end end
Door.Touched:connect(OnTouched) |
|
|
| Report Abuse |
|
|
Klink45
|
  |
| Joined: 06 Jun 2011 |
| Total Posts: 26054 |
|
|
| 07 Apr 2015 03:22 PM |
"if Player.Parent.Torso.Texture == http://www.robloc.com/asset/?version=&id=1028594"
"robloc" Change that to x! |
|
|
| Report Abuse |
|
|
|
| 07 Apr 2015 03:29 PM |
LOTS of things went wrong with your script, mainly just a bunch of typos and places where you skipped a child but I fixed everything and this is the working script:
local Door = script.Parent
function OnTouched (hit) local humanoid = hit.Parent:findFirstChild("Humanoid") if (humanoid) ~= nil then if humanoid.Parent.Torso.roblox.Texture == "http://www.roblox.com/asset/?version=&id=1028594" then Door.Cancollide = false Door.Transparency = 0.5 wait (3) Door.CanCollide = true Door.Transparency = 0 else humanoid.Health = 0 end end end
Door.Touched:connect(OnTouched)
also when you use roblox asset links (http://www.roblox.com/asset/) make sure you put parenthesis around them so that the script knows it's a string. |
|
|
| Report Abuse |
|
|
|
| 07 Apr 2015 03:32 PM |
missed a spot, in the script I posted replace
"http://www.robloc.com/asset/?version=&id=1028594"
with
"http://www.roblox.com/asset/?id=1028594"
|
|
|
| Report Abuse |
|
|
|
| 07 Apr 2015 03:35 PM |
Missed another spot, this is the complete working script (for real this time):
local Door = script.Parent
function OnTouched (hit) local humanoid = hit.Parent:findFirstChild("Humanoid") if (humanoid) ~= nil then if humanoid.Parent.Torso.roblox.Texture == "http://www.roblox.com/asset/?id=1028594" then Door.CanCollide = false Door.Transparency = 0.5 wait (3) Door.CanCollide = true Door.Transparency = 0 else humanoid.Health = 0 end end end
Door.Touched:connect(OnTouched) |
|
|
| Report Abuse |
|
|
|
| 07 Apr 2015 03:35 PM |
| No, get out, you don't belong here. |
|
|
| Report Abuse |
|
|
|
| 07 Apr 2015 03:46 PM |
@AnimatedUglyPet
I see you everywhere you nasty girl. |
|
|
| Report Abuse |
|
|
|
| 07 Apr 2015 03:50 PM |
| Learn to script before posting here, I am a 100 times better scripter than you. |
|
|
| Report Abuse |
|
|
|
| 07 Apr 2015 03:52 PM |
print("Hello world!")
Doesn't make you better in scripting. |
|
|
| Report Abuse |
|
|
|
| 07 Apr 2015 03:53 PM |
| thats not even your own script, you copied it from the wiki you dumb ####. |
|
|
| Report Abuse |
|
|
|
| 07 Apr 2015 04:14 PM |
Actually not, if you create a new script, it contains that print first.
Cute that you know that it's on wiki. |
|
|
| Report Abuse |
|
|
|
| 09 Apr 2015 03:22 PM |
| then you copy it also from new script |
|
|
| Report Abuse |
|
|