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 » Scripters
Home Search
 

Re: Specific Cancollide Parts?

Previous Thread :: Next Thread 
RoboGean is not online. RoboGean
Joined: 24 Mar 2011
Total Posts: 577
16 Jan 2015 09:42 PM
Is it possible to put a script in a Part that only allows anything to pass through it except a part named "Ball"?? I'm really trying to figure this out.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
16 Jan 2015 09:46 PM
DB = true

script.Parent.Touched:connect(function(h)
if DB and h.Name ~= "Ball" then
DB = false
script.Parent.CanCollide = false
script.Parent.TouchEnded:wait()
script.Parent.CanCollide = true
DB = true
end
end)
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
16 Jan 2015 10:20 PM
local db = false
local key = "Ball"

function fade(part,start,endd,incr,float,sett)
for i = start,endd,incr do
part.Transparency = i
wait(float)
end
part.CanCollide = sett
end

script.Parent.Touched:connect(function(hit)
if db = false then db = true
if hit.Name == key then
if script.Parent.Transparency > 0 then
fade(script.Parent,0,1,.1,.1,false)
wait(1)
fade(script.Parent,1,1,-.1,.1,true)
end
else
fade(script.Parent,0,1,.1,.1,false)
wait(1)
fade(script.Parent,1,1,-.1,.1,true)
end
end
db = false
end
end)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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