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: Help on this script..

Previous Thread :: Next Thread 
Juanpans is not online. Juanpans
Joined: 12 Jan 2009
Total Posts: 2680
17 Feb 2014 11:24 PM
print 'Door script'

door=game.Workspace.Experiment1:GetChildren()

function onTouch()

door.Transparency=.1
wait()
door.Transparency=.3
wait()
door.Transparency=.5
wait()
door.Transparency=.7
wait()
door.Transparency=.9

end

Not working..

It only shows
00:20:44.209 - attempt to call a nil value
In output

Help?

I Think i left something downstairs...Let me go upstairs and check
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
17 Feb 2014 11:26 PM
print'Door script'
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
17 Feb 2014 11:27 PM
oh, and have you defined "door"
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
17 Feb 2014 11:28 PM
nvm LOL
Let me remake this:


door=game.Workspace.Experiment1:GetChildren()

function onTouch()
for i = 1,#door do
door[i].Transparency=.1
wait()
door[i].Transparency=.3
wait()
door[i].Transparency=.5
wait()
door[i].Transparency=.7
wait()
door[i].Transparency=.9
end
door.Touched:connect(OnTouch)


Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
17 Feb 2014 11:29 PM
door=game.Workspace.Experiment1:GetChildren()

function onTouch()
for i = 1,#door do
door[i].Transparency=.1
wait()
door[i].Transparency=.3
wait()
door[i].Transparency=.5
wait()
door[i].Transparency=.7
wait()
door[i].Transparency=.9
end
end -- forgot this end lol
door.Touched:connect(onTouch) -- sry for making so many errors xd
Report Abuse
Juanpans is not online. Juanpans
Joined: 12 Jan 2009
Total Posts: 2680
17 Feb 2014 11:30 PM
This script is supposed to get the model called 'Experiment1' in Workspace

Get the children, change the parts inside it the transparency

I Think i left something downstairs...Let me go upstairs and check
Report Abuse
Juanpans is not online. Juanpans
Joined: 12 Jan 2009
Total Posts: 2680
17 Feb 2014 11:31 PM
O ok i aint see your script

let me try it

I Think i left something downstairs...Let me go upstairs and check
Report Abuse
Juanpans is not online. Juanpans
Joined: 12 Jan 2009
Total Posts: 2680
17 Feb 2014 11:57 PM
Doesnt work ;c

I Think i left something downstairs...Let me go upstairs and check
Report Abuse
TheRobloxian909 is not online. TheRobloxian909
Joined: 08 Aug 2013
Total Posts: 2444
18 Feb 2014 12:55 AM
door=game.Workspace.Experiment1:GetChildren()

function onTouch()
for i,v in pairs(door) do
if v:IsA("BasePart") then
v.Transparency = .1
v.CanCollide = false
reapet wait()
v.Transparency = v.Transparency + .2
until v.Transparency == 0.9
if v.Transparency == 0.9 then
reapet wait()
v.Tranparency = v.Transparency - .2
until v.Transparency == .1
v.Transparecy = 0
v.CanCollide = true
end
end
end

door.Touched:connect(onTouch)

Report Abuse
TheRobloxian909 is not online. TheRobloxian909
Joined: 08 Aug 2013
Total Posts: 2444
18 Feb 2014 12:56 AM
ohh, sorry.

function onTouch()
for i,v in pairs(door) do
if v:IsA("BasePart") then
v.Transparency = .1
reapet wait()
v.Transparency = v.Transparency + .2
until v.Transparency == 0.9
if v.Transparency == 0.9 then
reapet wait()
v.Tranparency = v.Transparency - .2
until v.Transparency == .1
v.Transparecy = 0
end
end
end

(onTouch)

Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
18 Feb 2014 02:54 AM
*Cough*
Coroutines n calling the function wrong
*Cough*

Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
18 Feb 2014 06:50 PM
therobloxian.. thats wrong...
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
18 Feb 2014 06:51 PM
ohhhh lololololoololoolololol


door=game.Workspace.Experiment1:GetChildren()

function onTouch()
for i = 1,#door do
door[i].Transparency=.1
wait()
door[i].Transparency=.3
wait()
door[i].Transparency=.5
wait()
door[i].Transparency=.7
wait()
door[i].Transparency=.9
end
end -- forgot this end lol
door[i].Touched:connect(onTouch) -- this should work :)
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