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
 

Help please

Previous Thread :: Next Thread 
zaniac10 is online. zaniac10
Joined: 18 Aug 2009
Total Posts: 10000
14 Oct 2014 10:04 AM
So, I did this, it's supposed to make your character invisible and then 2 seconds later appear again:

player = script.Parent.Parent
mouse = player:GetMouse();


mouse.KeyDown:connect(function(key)
key = key:lower();
if key == "i" then
for i,v in pairs(player.Character:GetChildren()) do
if v.ClassName == "Part" then
v.Transparency = 1
wait(2)
v.Transparency = 0
end
end

end
end)

doesn't work, no output
Report Abuse
zaniac10 is online. zaniac10
Joined: 18 Aug 2009
Total Posts: 10000
14 Oct 2014 10:33 AM
bump 1
Report Abuse
DrMathematica is not online. DrMathematica
Joined: 29 Aug 2008
Total Posts: 27268
14 Oct 2014 10:35 AM
"Doesn't work, no output"

Is not solid evidence it isn't working. Do some tests before people will actually help you. Add print statements to determine where the script stops - if it stops at all. Make sure it's running, make sure it's a LocalScript.

Do these things first before posting something useless: "Doesn't work, no output"
Report Abuse
zaniac10 is online. zaniac10
Joined: 18 Aug 2009
Total Posts: 10000
14 Oct 2014 10:46 AM
player = script.Parent.Parent
mouse = player:GetMouse();


mouse.KeyDown:connect(function(key)
key = key:lower();
if key == "i" then
print ("Player pressed I")
for i,v in pairs(player.Character:GetChildren()) do
if v.ClassName == "Part" then
v.Transparency = 1
print("Player is invisible")
wait(2)
v.Transparency = 0
print("Player is visible again")
end
end

end
end)

prints everything out, nothing happens to character, don't make stupid assumptions
Report Abuse
DrMathematica is not online. DrMathematica
Joined: 29 Aug 2008
Total Posts: 27268
14 Oct 2014 10:49 AM
"don't make stupid assumptions"

Good luck with your problem. What a dumb thing to say to someone who could possibly help you.
Report Abuse
zaniac10 is online. zaniac10
Joined: 18 Aug 2009
Total Posts: 10000
14 Oct 2014 10:54 AM
k
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