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: OnTouch Invisible

Previous Thread :: Next Thread 
are31 is not online. are31
Joined: 09 Nov 2007
Total Posts: 13767
04 Sep 2011 11:20 AM
function on()
isOn = true
script.Parent.Transparency = 0
script.Parent.CanCollide = true
end

script.Parent.Touched:connect(on)

it doesnt work.
and i also want one that makes you back to normal
Report Abuse
2WOOF2 is not online. 2WOOF2
Joined: 07 Aug 2009
Total Posts: 3444
04 Sep 2011 11:22 AM
Your just making it so that if the brick is invisible, it makes it visible, and it also makes it CanCollide.
Try this:

function on(hit)
isOn = true
hit.Transparency = 1
hit.CanCollide = false
end

script.Parent.Touched:connect(on)

¤שׂøøŦ¤ ಠ_ಠ <·me |--| you·> ಥ_ಥ ¤Just shoot for the stars If it feels right Then aim for my heart¤
Report Abuse
Cachinnation is not online. Cachinnation
Joined: 21 Aug 2011
Total Posts: 1797
04 Sep 2011 11:24 AM
local isOn = true

function on(cows)
if not isOn then return end
isOn = false
for i,v in pairs(game.Players:playerFromCharacter(cows.Parent):children()) do
if v:isA("Part") then
v.Transparency = 0 or 1
v.CanCollide = not v.CanCollide
wait()
isOn = true
end end end

script.Parent.Touched:connect(on)
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
04 Sep 2011 11:24 AM
You want a script making you invisible or the brick?

function on(hit)
script.Parent.Transparency = 1
wait()
script.Parent.Transparency = 0
end

script.Parent.Touched:connect(on)

this way or you want the toucher to be invisible? Or you want it to become visible again when you touch it?

Report Abuse
are31 is not online. are31
Joined: 09 Nov 2007
Total Posts: 13767
04 Sep 2011 11:25 AM
thanks ill try it
Report Abuse
are31 is not online. are31
Joined: 09 Nov 2007
Total Posts: 13767
04 Sep 2011 11:26 AM
@demon i want to turn invisible
Report Abuse
are31 is not online. are31
Joined: 09 Nov 2007
Total Posts: 13767
04 Sep 2011 11:29 AM
@Wolf It only makes my legs invisible
Report Abuse
Cachinnation is not online. Cachinnation
Joined: 21 Aug 2011
Total Posts: 1797
04 Sep 2011 11:30 AM
@are

That's because you only touched it with your legs.
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
04 Sep 2011 11:31 AM
If you want to turn invisible all these scripts are wrong...

Then you shouldn't use script.Parent too...

This is an easy script making you invisible

function on(hit)
hit.Parent:findFirstChild("Head").Transparency = 1
hit.Parent:findFirstChild("Torso").Transparency = 1
hit.Parent:findFirstChild("Left Arm").Transparency = 1
hit.Parent:findFirstChild("Right Arm").Transparency = 1
hit.Parent:findFirstChild("Left Leg").Transparency = 1
hit.Parent:findFirstChild("Right Leg").Transparency = 1
end
end

you get invisible...
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
04 Sep 2011 11:32 AM
Huh sry not all :3
Report Abuse
are31 is not online. are31
Joined: 09 Nov 2007
Total Posts: 13767
04 Sep 2011 11:34 AM
@demon where did you call the script?
Report Abuse
Cachinnation is not online. Cachinnation
Joined: 21 Aug 2011
Total Posts: 1797
04 Sep 2011 11:34 AM
@demon

That is very inefficient.
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
04 Sep 2011 11:35 AM
Yeah sorry i didn't put the last line in it...
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
04 Sep 2011 11:35 AM
Yes i know but it's an easy script to start with...
Report Abuse
are31 is not online. are31
Joined: 09 Nov 2007
Total Posts: 13767
04 Sep 2011 11:41 AM
is this the last line?


script.Parent.Touched:connect(hit)
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
04 Sep 2011 11:43 AM
No were it says:
connect(hit)
it should be
connect(on)
Report Abuse
are31 is not online. are31
Joined: 09 Nov 2007
Total Posts: 13767
04 Sep 2011 11:43 AM
thanks
Report Abuse
are31 is not online. are31
Joined: 09 Nov 2007
Total Posts: 13767
04 Sep 2011 11:45 AM
@demon

well i have added the script to make my face go away invisible
but how do i make my hats invisible?
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
04 Sep 2011 11:49 AM
i think removing the hat is the only possibility :s
Report Abuse
are31 is not online. are31
Joined: 09 Nov 2007
Total Posts: 13767
04 Sep 2011 11:52 AM
oh... dang it. and i only know the script to remove "are31" face. because i dont know how to make it where anyone can make it remove there face. so whats the script for that?
Report Abuse
demonskul777 is not online. demonskul777
Joined: 28 May 2010
Total Posts: 3716
04 Sep 2011 11:55 AM
idk what's the name of you're hat so i'm giving this

hit.Parent:findFirstChild("HatName"):remove()

i think this would work
Report Abuse
are31 is not online. are31
Joined: 09 Nov 2007
Total Posts: 13767
04 Sep 2011 11:57 AM
ok well i fixed the hat problem and found this script that works perfect

function onTouched(hit)
local d = hit.Parent:GetChildren()
for i=1, #d do
if (d[i].className == "Hat") then
d[i]:remove()
end
end
end

script.Parent.Touched:connect(onTouched)


but i still need the face remover!
Report Abuse
oxcool1 is not online. oxcool1
Joined: 05 Nov 2009
Total Posts: 15444
04 Sep 2011 12:28 PM
[ Content Deleted ]
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