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: Reason This Dosnt Work? (Again)

Previous Thread :: Next Thread 
TheLuaNoob is not online. TheLuaNoob
Joined: 04 May 2012
Total Posts: 482
05 May 2012 12:42 PM
I guess I broke it...


local time = 10

bin = script.Parent

function onTouched(part)
if part.Name == "Base" then
part.Parent.Name = "Base"
elseif part.Anchored == true and part.CanCollide == true then
part.Tramsparency = .0
part.Tramsparency = .1
part.Tramsparency = .2
part.Tramsparency = .3
part.Tramsparency = .4
part.Tramsparency = .5
part.Tramsparency = .6
part.Tramsparency = .7
part.Tramsparency = .8
part.Tramsparency = .9
part.Tramsparency = 1.0
part.Anchored = true
part.CanCollide = false
wait(time)
part.Tramsparency = 1.0
part.Tramsparency = .9
part.Tramsparency = .8
part.Tramsparency = .7
part.Tramsparency = .6
part.Tramsparency = .5
part.Tramsparency = .4
part.Tramsparency = .3
part.Tramsparency = .2
part.Tramsparency = .1
part.Tramsparency = .0
part.Anchored = true
part.CanCollide = true
elseif part.Anchored == false and part.CanCollide == false then
part.Tramsparency = .0
part.Tramsparency = .1
part.Tramsparency = .2
part.Tramsparency = .3
part.Tramsparency = .4
part.Tramsparency = .5
part.Tramsparency = .6
part.Tramsparency = .7
part.Tramsparency = .8
part.Tramsparency = .9
part.Tramsparency = 1.0
part.Anchored = true
part.CanCollide = false
wait(time)
part.Tramsparency = 1.0
part.Tramsparency = .9
part.Tramsparency = .8
part.Tramsparency = .7
part.Tramsparency = .6
part.Tramsparency = .5
part.Tramsparency = .4
part.Tramsparency = .3
part.Tramsparency = .2
part.Tramsparency = .1
part.Tramsparency = .0
part.Anchored = false
part.CanCollide = false
elseif part.Anchored == true and part.CanCollide == false then
part.Tramsparency = .0
part.Tramsparency = .1
part.Tramsparency = .2
part.Tramsparency = .3
part.Tramsparency = .4
part.Tramsparency = .5
part.Tramsparency = .6
part.Tramsparency = .7
part.Tramsparency = .8
part.Tramsparency = .9
part.Tramsparency = 1.0
part.Anchored = true
part.CanCollide = false
wait(time)
part.Tramsparency = 1.0
part.Tramsparency = .9
part.Tramsparency = .8
part.Tramsparency = .7
part.Tramsparency = .6
part.Tramsparency = .5
part.Tramsparency = .4
part.Tramsparency = .3
part.Tramsparency = .2
part.Tramsparency = .1
part.Tramsparency = .0
part.Anchored = true
part.CanCollide = false
elseif part.Anchored == false and part.CanCollide == true then
part.Tramsparency = .0
part.Tramsparency = .1
part.Tramsparency = .2
part.Tramsparency = .3
part.Tramsparency = .4
part.Tramsparency = .5
part.Tramsparency = .6
part.Tramsparency = .7
part.Tramsparency = .8
part.Tramsparency = .9
part.Tramsparency = 1.0
part.Anchored = true
part.CanCollide = false
wait(time)
part.Tramsparency = 1.0
part.Tramsparency = .9
part.Tramsparency = .8
part.Tramsparency = .7
part.Tramsparency = .6
part.Tramsparency = .5
part.Tramsparency = .4
part.Tramsparency = .3
part.Tramsparency = .2
part.Tramsparency = .1
part.Tramsparency = .0
part.Anchored = false
part.CanCollide = true
end
end

connection = bin.Touched:connect(onTouched)






~!~ Plus One Post ~!~
Report Abuse
Jlobblet is not online. Jlobblet
Joined: 05 Sep 2010
Total Posts: 587
05 May 2012 12:47 PM
Transparency not tramsparency

~if not ok then return end
Report Abuse
TheLuaNoob is not online. TheLuaNoob
Joined: 04 May 2012
Total Posts: 482
05 May 2012 12:56 PM
Thanks, I feel stupid now though. Fixed full script if anyone needs it



local time = 10
local time2 = 0

bin = script.Parent

function onTouched(part)
if part.Name == "Base" then
part.Parent.Name = "Base"
elseif part.Anchored == true and part.CanCollide == true then
wait(time2)
part.Transparency = .0
wait(time2)
part.Transparency = .1
wait(time2)
part.Transparency = .2
wait(time2)
part.Transparency = .3
wait(time2)
part.Transparency = .4
wait(time2)
part.Transparency = .5
wait(time2)
part.Transparency = .6
wait(time2)
part.Transparency = .7
wait(time2)
part.Transparency = .8
wait(time2)
part.Transparency = .9
wait(time2)
part.Transparency = 1.0
wait(time2)
part.Anchored = true
part.CanCollide = false
wait(time)
part.Transparency = 1.0
wait(time2)
part.Transparency = .9
wait(time2)
part.Transparency = .8
wait(time2)
part.Transparency = .7
wait(time2)
part.Transparency = .6
wait(time2)
part.Transparency = .5
wait(time2)
part.Transparency = .4
wait(time2)
part.Transparency = .3
wait(time2)
part.Transparency = .2
wait(time2)
part.Transparency = .1
wait(time2)
part.Transparency = .0
wait(time2)
part.Anchored = true
part.CanCollide = true
elseif part.Anchored == false and part.CanCollide == false then
wait(time2)
part.Transparency = .0
wait(time2)
part.Transparency = .1
wait(time2)
part.Transparency = .2
wait(time2)
part.Transparency = .3
wait(time2)
part.Transparency = .4
wait(time2)
part.Transparency = .5
wait(time2)
part.Transparency = .6
wait(time2)
part.Transparency = .7
wait(time2)
part.Transparency = .8
wait(time2)
part.Transparency = .9
wait(time2)
part.Transparency = 1.0
wait(time2)
part.Anchored = true
part.CanCollide = false
wait(time)
wait(time)
part.Transparency = 1.0
wait(time2)
part.Transparency = .9
wait(time2)
part.Transparency = .8
wait(time2)
part.Transparency = .7
wait(time2)
part.Transparency = .6
wait(time2)
part.Transparency = .5
wait(time2)
part.Transparency = .4
wait(time2)
part.Transparency = .3
wait(time2)
part.Transparency = .2
wait(time2)
part.Transparency = .1
wait(time2)
part.Transparency = .0
wait(time2)
part.Anchored = false
part.CanCollide = false
elseif part.Anchored == true and part.CanCollide == false then
wait(time2)
part.Transparency = .0
wait(time2)
part.Transparency = .1
wait(time2)
part.Transparency = .2
wait(time2)
part.Transparency = .3
wait(time2)
part.Transparency = .4
wait(time2)
part.Transparency = .5
wait(time2)
part.Transparency = .6
wait(time2)
part.Transparency = .7
wait(time2)
part.Transparency = .8
wait(time2)
part.Transparency = .9
wait(time2)
part.Transparency = 1.0
wait(time2)
part.Anchored = true
part.CanCollide = false
wait(time)
part.Transparency = 1.0
wait(time2)
part.Transparency = .9
wait(time2)
part.Transparency = .8
wait(time2)
part.Transparency = .7
wait(time2)
part.Transparency = .6
wait(time2)
part.Transparency = .5
wait(time2)
part.Transparency = .4
wait(time2)
part.Transparency = .3
wait(time2)
part.Transparency = .2
wait(time2)
part.Transparency = .1
wait(time2)
part.Transparency = .0
wait(time2)
part.Anchored = true
part.CanCollide = false
elseif part.Anchored == false and part.CanCollide == true then
wait(time2)
part.Transparency = .0
wait(time2)
part.Transparency = .1
wait(time2)
part.Transparency = .2
wait(time2)
part.Transparency = .3
wait(time2)
part.Transparency = .4
wait(time2)
part.Transparency = .5
wait(time2)
part.Transparency = .6
wait(time2)
part.Transparency = .7
wait(time2)
part.Transparency = .8
wait(time2)
part.Transparency = .9
wait(time2)
part.Transparency = 1.0
wait(time2)
part.Anchored = true
part.CanCollide = false
wait(time)
part.Transparency = 1.0
wait(time2)
part.Transparency = .9
wait(time2)
part.Transparency = .8
wait(time2)
part.Transparency = .7
wait(time2)
part.Transparency = .6
wait(time2)
part.Transparency = .5
wait(time2)
part.Transparency = .4
wait(time2)
part.Transparency = .3
wait(time2)
part.Transparency = .2
wait(time2)
part.Transparency = .1
wait(time2)
part.Transparency = .0
wait(time2)
part.Anchored = false
part.CanCollide = true
end
end

connection = bin.Touched:connect(onTouched)









~!~ Plus One Post ~!~
Report Abuse
C0D3Y is not online. C0D3Y
Joined: 24 Jul 2010
Total Posts: 1692
05 May 2012 12:59 PM
Please go on the wiki and search up loops. My fingers are cramping up just reading this...
Report Abuse
TheLuaNoob is not online. TheLuaNoob
Joined: 04 May 2012
Total Posts: 482
05 May 2012 01:10 PM
A loop wouldnt work.

I already read all the wiki.
Its for a tool.
So I cant loop it

~!~ Plus One Post ~!~
Report Abuse
Jlobblet is not online. Jlobblet
Joined: 05 Sep 2010
Total Posts: 587
05 May 2012 01:12 PM
"It's for a tool.
So I can't loop it"

Yes, you can:

for index - 0,1,0.1 do
partname.Transparency = index
wait(time)
end

~if not ok then return end
Report Abuse
TheLuaNoob is not online. TheLuaNoob
Joined: 04 May 2012
Total Posts: 482
05 May 2012 01:14 PM
Not what I mean.
I mean a loop isnt what I need

~!~ Plus One Post ~!~
Report Abuse
C0D3Y is not online. C0D3Y
Joined: 24 Jul 2010
Total Posts: 1692
05 May 2012 01:34 PM
Would make it so much easier...
Report Abuse
TheLuaNoob is not online. TheLuaNoob
Joined: 04 May 2012
Total Posts: 482
05 May 2012 02:33 PM
Well Im just a Lua Noob. So let me script the way I can

~!~ Plus One Post ~!~
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