Shobobo99
|
  |
| Joined: 30 Dec 2008 |
| Total Posts: 5754 |
|
|
| 31 Jul 2010 06:13 PM |
the first part of the script works , it gives me the gui but when i try to return it 10 later, it doesnt work!
-part1 function touchedIt(hit, touched, taken, taker, takerb, owner, deb) if hit.Name == "Right Leg" and deb == true and taken.Value == false then deb = false taken.Value = true taker = hit.Parent takerb = game.Players:GetPlayerFromCharacter(hit.Parent) local gui = game.Lighting:findFirstChild(string.match(touched.Name,"Mech....")):clone() gui.Parent = takerb.PlayerGui.ScreenGui owner.Name = "Current User of Mech: "..(taker.Name) touched.BrickColor = BrickColor.new(21) wait(10) touched.BrickColor = BrickColor.new(37) deb = true --part2 elseif hit.Name == "Right Leg" and deb == true and taken.Value == true and hit.Parent == taker then print("what") deb = false touched.BrickColor = BrickColor.new(21) takerb.PlayerGui.ScreenGui:findFirstChild(string.match(touched.Name,"Mech....")):Remove() taken.Value = false taker = nil takerb = nil owner.Name = "Current User of Mech: No One" wait(10) --mech = game.Lighting:findFirstChild(string.match(touched.Name,"Mech....")):clone() deb = true touched.BrickColor = BrickColor.new(37) end end |
|
|
| Report Abuse |
|
|
Shobobo99
|
  |
| Joined: 30 Dec 2008 |
| Total Posts: 5754 |
|
|
| 31 Jul 2010 06:26 PM |
ill post the connections
workspace.Mech1GuiGiver.Touched:connect(function(h) touchedIt(h, workspace.Mech1GuiGiver,Taken1, Taker1,Taker1B, owner1, deb1) end) workspace.Mech2GuiGiver.Touched:connect(function(h) touchedIt(h, workspace.Mech2GuiGiver,Taken2, Taker2,Taker2B, owner2, deb2) end) |
|
|
| Report Abuse |
|
|
Shobobo99
|
  |
| Joined: 30 Dec 2008 |
| Total Posts: 5754 |
|
|
| 31 Jul 2010 06:44 PM |
edited a bit but still doesnt work. HELP
function touchedIt(hit, touched, taken, taker, takerb, owner) if hit.Name == "Right Leg" and touched.BrickColor == BrickColor.new(37) and taken.Value == false then touched.BrickColor = BrickColor.new(21) taken.Value = true taker = hit.Parent takerb = game.Players:GetPlayerFromCharacter(hit.Parent) local gui = game.Lighting:findFirstChild(string.match(touched.Name,"Mech....")):clone() gui.Parent = takerb.PlayerGui.ScreenGui owner.Name = "Current User of Mech: "..(taker.Name) wait(10) touched.BrickColor = BrickColor.new(37)
elseif hit.Name == "Right Leg" and touched.BrickColor == BrickColor.new(37) and taken.Value == true and hit.Parent == taker then print("what")
touched.BrickColor = BrickColor.new(21) if takerb.PlayerGui.ScreenGui:findFirstChild(string.match(touched.Name,"Mech....")) then takerb.PlayerGui.ScreenGui:findFirstChild(string.match(touched.Name,"Mech....")):Remove() end taken.Value = false taker = nil takerb = nil owner.Name = "Current User of Mech: No One" wait(10) --mech = game.Lighting:findFirstChild(string.match(touched.Name,"Mech....")):clone()
touched.BrickColor = BrickColor.new(37) end end |
|
|
| Report Abuse |
|
|
Shobobo99
|
  |
| Joined: 30 Dec 2008 |
| Total Posts: 5754 |
|
| |
|
Shobobo99
|
  |
| Joined: 30 Dec 2008 |
| Total Posts: 5754 |
|
| |
|
Shobobo99
|
  |
| Joined: 30 Dec 2008 |
| Total Posts: 5754 |
|
| |
|
Shobobo99
|
  |
| Joined: 30 Dec 2008 |
| Total Posts: 5754 |
|
| |
|