droppop
|
  |
| Joined: 28 Aug 2009 |
| Total Posts: 5259 |
|
|
| 16 Mar 2013 03:00 PM |
function onTouch(part1) local humanoid = part1.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then zombie1 = script.Parent.Parent.zombie1 zombie1.Head.Transparency = 0 zombie1.Torso.Transparency = 0 zombie1["Left Arm"].Transparency = 0 zombie1["Right Arm"].Transparency = 0 zombie1["Left Leg"].Transparency = 0 zombie1["Right Leg"].Transparency = 0 wait(0.3) zombie1.Head.Transparency = 1 zombie1.Torso.Transparency = 1 zombie1["Left Arm"].Transparency = 1 zombie1["Right Arm"].Transparency = 1 zombie1["Left Leg"].Transparency = 1 zombie1["Right Leg"].Transparency = 1 wait(0.1) local humanoid = part1.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then zombie2 = script.Parent.Parent.zombie1 zombie2.Head.Transparency = 0 zombie2.Torso.Transparency = 0 zombie2["Left Arm"].Transparency = 0 zombie2["Right Arm"].Transparency = 0 zombie2["Left Leg"].Transparency = 0 zombie2["Right Leg"].Transparency = 0 wait(0.3) zombie2.Head.Transparency = 1 zombie2.Torso.Transparency = 1 zombie2["Left Arm"].Transparency = 1 zombie2["Right Arm"].Transparency = 1 zombie2["Left Leg"].Transparency = 1 zombie2["Right Leg"].Transparency = 1 wait(0.1) local humanoid = part1.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then zombie3 = script.Parent.Parent.zombie1 zombie3.Head.Transparency = 0 zombie3.Torso.Transparency = 0 zombie3["Left Arm"].Transparency = 0 zombie3["Right Arm"].Transparency = 0 zombie3["Left Leg"].Transparency = 0 zombie3["Right Leg"].Transparency = 0 wait(0.3) zombie3.Head.Transparency = 1 zombie3.Torso.Transparency = 1 zombie3["Left Arm"].Transparency = 1 zombie3["Right Arm"].Transparency = 1 zombie3["Left Leg"].Transparency = 1 zombie3["Right Leg"].Transparency = 1
end end end end script.Parent.Touched:connect(onTouch)
It's like stop-motion. One zombie becomes visible for half a sec, then the next, and then the next to make it look like the zombie's moving. However, all I get is zombie1 to flicker invisible and visible. Help! |
|
|
| Report Abuse |
|
|
droppop
|
  |
| Joined: 28 Aug 2009 |
| Total Posts: 5259 |
|
|
| 16 Mar 2013 03:01 PM |
They are in a model. This is what's in the model.
zombie1 zombie2 zombie3
part1
in the model. |
|
|
| Report Abuse |
|
|
droppop
|
  |
| Joined: 28 Aug 2009 |
| Total Posts: 5259 |
|
| |
|
|
| 16 Mar 2013 06:31 PM |
First of all lets shorten it a little:
function vis(t) zombie1.Head.Transparency = t zombie1.Torso.Transparency = t zombie1["Left Arm"].Transparency = t zombie1["Right Arm"].Transparency = t zombie1["Left Leg"].Transparency = t zombie1["Right Leg"].Transparency = t end
local zombie1 = script.Parent.Parent.zombie1
function onTouch(part1) local humanoid = part1.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then zombie1 = script.Parent.Parent.zombie1 vis(0) wait(0.3) vis(1) wait(0.1) local humanoid = part1.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then zombie2 = script.Parent.Parent.zombie1 vis(0) wait(0.3) vis(1) wait(0.1) local humanoid = part1.Parent:FindFirstChild("Humanoid") if (humanoid ~= nil) then zombie3 = script.Parent.Parent.zombie1 vis(0) wait(0.3) vis(1) end end end end
script.Parent.Touched:connect(onTouch) |
|
|
| Report Abuse |
|
|
| |
|
droppop
|
  |
| Joined: 28 Aug 2009 |
| Total Posts: 5259 |
|
| |
|