DeAlphy
|
  |
| Joined: 28 Sep 2014 |
| Total Posts: 6790 |
|
|
| 20 Jan 2015 08:19 PM |
local debounce = false function onTouched(part) local h = part.Parent:findFirstChild("Humanoid") if h~=nil and debounce == false then debounce = true Field = Instance.new("ForceField") Field.Parent = part.Parent wait(4) debounce = false end end
if (script.Parent ~= nil) and (script.Parent.className == "Part") then connection = script.Parent.Touched:connect(onTouched) end
-----Im trying to make ff in game when u spawn. I cant put a spawn in cause it messes up my spawning system. I put a part that has cancolide off right where u drop. It gives ff but it dosnt dissappear!! |
|
|
| Report Abuse |
|
|
DeAlphy
|
  |
| Joined: 28 Sep 2014 |
| Total Posts: 6790 |
|
| |
|
|
| 20 Jan 2015 08:22 PM |
| that end at the end isnt needed i dont think |
|
|
| Report Abuse |
|
|
baheeg
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 72846 |
|
| |
|
|
| 20 Jan 2015 08:23 PM |
wait add this
wait(10) Field:remove() |
|
|
| Report Abuse |
|
|
| |
|
baheeg
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 72846 |
|
|
| 20 Jan 2015 08:24 PM |
Remove is deprecated User Destroy instead |
|
|
| Report Abuse |
|
|
| |
|
DeAlphy
|
  |
| Joined: 28 Sep 2014 |
| Total Posts: 6790 |
|
|
| 20 Jan 2015 08:28 PM |
@ji doesnt work
@others saying remove() and destroy() that only works for the 1st time u spawn then when u die again, it does not remove the ff |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2015 08:30 PM |
Care.exe not found. Try again later.
Send me trades |
|
|
| Report Abuse |
|
|
| |
|
DeAlphy
|
  |
| Joined: 28 Sep 2014 |
| Total Posts: 6790 |
|
| |
|
DeAlphy
|
  |
| Joined: 28 Sep 2014 |
| Total Posts: 6790 |
|
| |
|
DeAlphy
|
  |
| Joined: 28 Sep 2014 |
| Total Posts: 6790 |
|
| |
|
|
| 20 Jan 2015 08:39 PM |
Why dont you use CharacterAdded instead?
game.Players.PlayerAdded:connect(function(plr) plr.CharacterAdded:connect(function(char) --InsertForcefield end) end)
brb sobbing R$0 |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2015 08:45 PM |
You say it works but its not removed?
What I would do is create a forcefield and put it inside ServerStorage (script shouldnt be local)
inside it, make a script that removes the ff in the time u want
game:GetService("Debris"):AddItem(script.Parent, 6) --removes ff in 6 seconds
brb sobbing R$0 |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2015 08:45 PM |
| gtfo of lmad dude wtf??? this isn't even the right place to post this |
|
|
| Report Abuse |
|
|
DeAlphy
|
  |
| Joined: 28 Sep 2014 |
| Total Posts: 6790 |
|
| |
|
|
| 20 Jan 2015 09:04 PM |
| By output, I mean if you go to view, then click on output it shows you the errors with the script... |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2015 09:05 PM |
| Delete the "connection =" part, it isn't needed. |
|
|
| Report Abuse |
|
|
PestJ
|
  |
| Joined: 22 Dec 2011 |
| Total Posts: 18267 |
|
|
| 20 Jan 2015 09:06 PM |
lol at these noobs telling him to get out olf
--pestj |
|
|
| Report Abuse |
|
|
DeAlphy
|
  |
| Joined: 28 Sep 2014 |
| Total Posts: 6790 |
|
|
| 20 Jan 2015 09:12 PM |
@master it is needed i got the ff but now it needs to be removed |
|
|
| Report Abuse |
|
|
|
| 20 Jan 2015 09:31 PM |
you completeley ignored my threads
brb sobbing R$0 |
|
|
| Report Abuse |
|
|
swordron
|
  |
| Joined: 23 Jun 2008 |
| Total Posts: 27432 |
|
|
| 20 Jan 2015 09:35 PM |
dude the connection line bruhaha isnt needed tbh just do this
script.Parent.onTouched:connect(function(part)
then you dont have to use the connection line |
|
|
| Report Abuse |
|
|
nacker
|
  |
| Joined: 06 Oct 2009 |
| Total Posts: 6034 |
|
|
| 20 Jan 2015 09:39 PM |
if script.Parent~=nil and script.Parent.ClassName=="Part" then local debounce=false script.Parent.Touched:connect(function(part) local h = part.Parent:findFirstChild("Humanoid") if h~=nil and debounce == false then debounce = true Field = Instance.new("ForceField") Field.Parent = part.Parent wait(4) debounce = false end end) end
|
|
|
| Report Abuse |
|
|