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: why wont my door work?

Previous Thread :: Next Thread 
Eviltastic is not online. Eviltastic
Joined: 21 Aug 2009
Total Posts: 6009
21 Feb 2014 05:26 PM
Sorry, very basic scripter, just started learning today
Heres the script:

local brick = Workspace.Brick

brick.Touched:connect (onTouched)

local brick = Workspace.brick

function onTouch (part)
brick.Transparency = 1
wait (0.9)
brick.Transparency = 0

brick.Touched = connect(onTouch)
end

if brick.Touched:connect (onTouched) then
cancollide = false
end

It doesn't go transparent with the cancollide section, but it will without.
Report Abuse
Eviltastic is not online. Eviltastic
Joined: 21 Aug 2009
Total Posts: 6009
21 Feb 2014 05:28 PM
bump
Report Abuse
7y13rb is not online. 7y13rb
Joined: 28 May 2011
Total Posts: 223
21 Feb 2014 05:30 PM
gonna change it a little:

--you defined brick twice
local brick = game.Workspace.Brick

function onTouched(part)

brick.Transparency = 0.5
brick.CanCollide = false
wait(1)
brick.Transparency = 0
brick.CanCollide = true

end

brick.Touched:connect(onTouched)
Report Abuse
7y13rb is not online. 7y13rb
Joined: 28 May 2011
Total Posts: 223
21 Feb 2014 05:34 PM
and if that didn't work, then put this is brick and remove first script:

local brick = script.Parent

function onTouched(part)

brick.Transparency = 0.5
brick.CanCollide = false
print 'You can walk through it'
wait(1)
brick.Transparency = 0
brick.CanCollide = true
print 'You can't walk through it'

end

script.Parent.Touched:connect(onTouched)
Report Abuse
7y13rb is not online. 7y13rb
Joined: 28 May 2011
Total Posts: 223
21 Feb 2014 05:34 PM
put this in brick**
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
21 Feb 2014 05:39 PM
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") ~= nil then
script.Parent.Transparency = 1
script.Parent.CanCollide = false
wait (0.9)
script.Parent.Transparency = 0
script.Parent.CanCollide = true
end end)
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