generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Problem with script

Previous Thread :: Next Thread 
Shobobo99 is not online. 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 is not online. 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 is not online. 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 is not online. Shobobo99
Joined: 30 Dec 2008
Total Posts: 5754
31 Jul 2010 07:20 PM
bump
Report Abuse
Shobobo99 is not online. Shobobo99
Joined: 30 Dec 2008
Total Posts: 5754
02 Aug 2010 12:48 PM
nump
Report Abuse
Shobobo99 is not online. Shobobo99
Joined: 30 Dec 2008
Total Posts: 5754
02 Aug 2010 02:14 PM
nother bump
Report Abuse
Shobobo99 is not online. Shobobo99
Joined: 30 Dec 2008
Total Posts: 5754
02 Aug 2010 03:01 PM
bump
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image