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: How to make a brick transparent when you touch another brick

Previous Thread :: Next Thread 
wsx7 is not online. wsx7
Joined: 04 Mar 2010
Total Posts: 834
18 Sep 2014 05:20 AM
?
Report Abuse
wsx7 is not online. wsx7
Joined: 04 Mar 2010
Total Posts: 834
18 Sep 2014 05:24 AM
//
Report Abuse
wsx7 is not online. wsx7
Joined: 04 Mar 2010
Total Posts: 834
18 Sep 2014 05:25 AM
???
Report Abuse
wsx7 is not online. wsx7
Joined: 04 Mar 2010
Total Posts: 834
18 Sep 2014 05:26 AM
????
Report Abuse
wsx7 is not online. wsx7
Joined: 04 Mar 2010
Total Posts: 834
18 Sep 2014 05:27 AM
?????
Report Abuse
wsx7 is not online. wsx7
Joined: 04 Mar 2010
Total Posts: 834
18 Sep 2014 05:29 AM
??????
Report Abuse
OzzyFin is not online. OzzyFin
Joined: 07 Jun 2011
Total Posts: 3600
18 Sep 2014 05:33 AM
script.Parent.Touched:connect(function()
Workspace.Part.Transparency = .5
end
Report Abuse
wsx7 is not online. wsx7
Joined: 04 Mar 2010
Total Posts: 834
18 Sep 2014 05:39 AM
doesnt work
Report Abuse
wsx7 is not online. wsx7
Joined: 04 Mar 2010
Total Posts: 834
18 Sep 2014 05:41 AM
???????
Report Abuse
OzzyFin is not online. OzzyFin
Joined: 07 Jun 2011
Total Posts: 3600
18 Sep 2014 05:43 AM
then u kno nothin 'bout scriptin do u


part = Workspace["partnamehere"]

script.Parent.Touched:connect(function()
part.Transparency = .5
end)


if you do, you should know how to check if there is a Humanoid in the part's Parent what touches script.Parent.

obv place the script into the part you want to be touched
Report Abuse
OriginalNexus is not online. OriginalNexus
Joined: 27 Oct 2008
Total Posts: 242
18 Sep 2014 08:35 AM
enabled = 0
val = 0

function onTouched(part)
-- All characters have a Humanoid object
-- If the model has one, it is a character
-- print("In The Script")
local h = part.Parent:findFirstChild("Humanoid") -- Find Humanoids in whatever touched this
if (h ~=nil) then -- If there is a Humanoid then
-- h.Health = h.MaxHealth -- Set the health to maximum (full healing)
if (enabled == 0) then
enabled = 1
val = val+0.1
script.Parent.Transparency = val
script.Parent.CanCollide = true
wait(.1)
val = val+0.1
script.Parent.Transparency = 0.1+val
script.Parent.CanCollide = true
wait(.1)
val = val+0.1
script.Parent.Transparency = 0.1+val
script.Parent.CanCollide = true
wait(.1)
val = val+0.1
script.Parent.Transparency = 0.1+val
script.Parent.CanCollide =true
wait(.1)
val = val+0.1
script.Parent.Transparency = 0.1+val
script.Parent.CanCollide = true
wait(.1)
val = val+0.1
script.Parent.Transparency = 0.1+val
script.Parent.CanCollide = true
wait(.1)
val = val+0.1
script.Parent.Transparency = 0.1+val
script.Parent.CanCollide = true
wait(.1)
val = val+0.1
script.Parent.Transparency = 0.1+val
script.Parent.CanCollide = true
wait(.1)
val = val+0.1
script.Parent.Transparency = 0.1+val
script.Parent.CanCollide = true
wait(.1)
script.Parent.Transparency = 1
script.Parent.CanCollide = false
wait(1) - CHANGE FOR RESET TIME
val = 0
enabled = 0
script.Parent.Transparency = 0
script.Parent.CanCollide = true
end
end
end

script.Parent.Touched:connect(onTouched) -- Make it call onTouched when touched

This is a timed one which u can change to your needs
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