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: onTouch forcefield script.

Previous Thread :: Next Thread 
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
07 Apr 2014 05:54 PM
[ Content Deleted ]
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
07 Apr 2014 05:57 PM
[ Content Deleted ]
Report Abuse
NeonRiver is not online. NeonRiver
Joined: 12 Feb 2013
Total Posts: 4936
07 Apr 2014 06:10 PM
[ Content Deleted ]
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
07 Apr 2014 06:12 PM
script.Parent.Touched:connect(function(c)
if c.Parent:FindFirstChild("Humanoid") then
f = instance.new("ForceField", c.Parent)
wait(math.huge)
f:Destroy()
end
end)
Report Abuse
ThisUserSecret is not online. ThisUserSecret
Joined: 29 Sep 2012
Total Posts: 1094
07 Apr 2014 06:18 PM
Put this into a brick >.>

function touch(hit)
if hit.Parent:FindFirstChild("Humanoid") ~= nil then
x=hit.Parent:FindFirstChild("Humanoid")
Instance.new("ForceField", x.Parent)
end
script.Parent.Touched:connect(touch)
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
07 Apr 2014 06:27 PM
Pretty sure mine works better
Report Abuse
ThisUserSecret is not online. ThisUserSecret
Joined: 29 Sep 2012
Total Posts: 1094
07 Apr 2014 06:38 PM
No...
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
07 Apr 2014 06:43 PM
local db = false

script.Parent.Touched:connect(function(hit)
db = true
if hit.Parent:FindFirstChild("Humanoid") ~= nil then
repeat
force = hit.Parent:FindFirstChild("ForceField",true)
force:Destroy()
until
hit.Parent:FindFirstChild("ForceField",false)
db = true
end end)
Report Abuse
ForeverDev is not online. ForeverDev
Joined: 04 Oct 2008
Total Posts: 13300
07 Apr 2014 06:51 PM
AGH! WHY ARE YOU WAITING math.huge?????

local db = false

script.Parent.Touched:connect(function(part)
if db then return end
if part.Parent:FindFirstChild("Humanoid") then
db = true
Instance.new("ForceField", part.Parent)
wait(3)
db = false
end
end)
Report Abuse
Ariophy is not online. Ariophy
Joined: 08 Mar 2014
Total Posts: 81
07 Apr 2014 07:40 PM
local db = false

script.Parent.Touched:connect(function(part)
if db then return end
if part.Parent:FindFirstChild("Humanoid") then
db = true
Instance.new("ForceField", part.Parent)
wait(3)
db = false
end
end)

Like this, I think.
Report Abuse
BladeXE is not online. BladeXE
Joined: 22 Dec 2012
Total Posts: 3857
07 Apr 2014 07:58 PM
so that the forcefield is never removed
I can do what I want
lol
Report Abuse
ForeverDev is not online. ForeverDev
Joined: 04 Oct 2008
Total Posts: 13300
07 Apr 2014 08:01 PM
@Ario

Did you just copy and paste my script? lol
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