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: Stop Blinking

Previous Thread :: Next Thread 
kokko1234 is not online. kokko1234
Joined: 15 Jun 2012
Total Posts: 39
22 Dec 2016 08:08 AM
How can i make this stop blinking?

part.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
part.Transparency = 1
end
end)

part.TouchEnded:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
part.Transparency = 0
end
end)
Report Abuse
VineyardVine is not online. VineyardVine
Joined: 20 Nov 2010
Total Posts: 904
22 Dec 2016 08:13 AM
You need a debounce

Currently it is changing everytime any part of the humanoid touches your part

local debounce = false
local hitpart
part.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and not debounce then
debounce = true
hitpart = hit
part.Transparency = 1
end
end)

part.TouchEnded:connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") and hit == hitpart and debounce then
debounce = false
part.Transparency = 0
end
end)
Report Abuse
kokko1234 is not online. kokko1234
Joined: 15 Jun 2012
Total Posts: 39
22 Dec 2016 10:09 AM
thanks dude
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