dawgra
|
  |
| Joined: 31 Oct 2008 |
| Total Posts: 9877 |
|
|
| 03 Sep 2012 12:06 PM |
Hi,I'm making the "Survival Game". I need your help.
Well,there's the "Juggernaut". I want to slown him down,with REVOLVER. Stun - Sparkles Jeff - BoolValue
local ToLookFor = "Humanoid" -- If you want it to damage something other than Players
function OnTouched(hit) -- When the bullet is touched... local h = hit.Parent:findFirstChild(ToLookFor) -- find ToLookFor in the thing that was hit if h ~= nil then -- If it is there... if h.Jeff.Value = false then h.Jeff.Value = true h.WalkSpeed = 15 h.Parent.Torso.Stun.Enabled = true script.Parent:Remove() -- remove the bullet wait(5) h.WalkSpeed = 20 h.Parent.Torso.Stun.Enabled = false h.Jeff.Value = false end
if h.Jeff.Value = true then script.Parent:Remove() -- remove the bullet end end --end the if
if h == nil then -- if there is no ToLookFor in the thing that was hit.... script.Parent:Remove() -- remove the bullet end -- end the if end -- end the function
script.Parent.Touched:connect(OnTouched) -- Connect the OnTouched function to the bullet. |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2012 12:07 PM |
What seems to be the problem?
-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]- |
|
|
| Report Abuse |
|
|
dawgra
|
  |
| Joined: 31 Oct 2008 |
| Total Posts: 9877 |
|
| |
|
|
| 03 Sep 2012 12:08 PM |
That's not helpful. What doesn't work about it? Is there any output?
-[::ƧѡÎḾḠΰῩ::]-[::Maker of stuff and Helper of Scripting::]- |
|
|
| Report Abuse |
|
|
dawgra
|
  |
| Joined: 31 Oct 2008 |
| Total Posts: 9877 |
|
|
| 03 Sep 2012 12:13 PM |
Output... Umm... 19:12:49 - Workspace.Bullet.BulletDamage:6: 'then' expected near '=' 19:12:51 - Workspace.Bullet.BulletDamage:6: 'then' expected near '=' |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2012 12:14 PM |
if h.Jeff.Value = false then
Two equal signs:
== |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2012 12:16 PM |
if not h.Jeff.Value then
No equal signs:
:P
(>•д•)> ¤¤ †KMXD† ¤¤ [SHG Tier~3] (^•д•^) [Freelancing Scripting Guru] <(•д•<) |
|
|
| Report Abuse |
|
|
dawgra
|
  |
| Joined: 31 Oct 2008 |
| Total Posts: 9877 |
|
|
| 03 Sep 2012 12:26 PM |
19:25:31 - Script "Workspace.Bullet.BulletDamage", Line 6 19:25:31 - stack end 19:25:31 - Disconnected event because of exception |
|
|
| Report Abuse |
|
|
dawgra
|
  |
| Joined: 31 Oct 2008 |
| Total Posts: 9877 |
|
| |
|
dawgra
|
  |
| Joined: 31 Oct 2008 |
| Total Posts: 9877 |
|
| |
|
|
| 03 Sep 2012 12:38 PM |
Well Jeff may or may not exist, so put an if statement to check for it.
(>•д•)> ¤¤ †KMXD† ¤¤ [SHG Tier~3] (^•д•^) [Freelancing Scripting Guru] <(•д•<) |
|
|
| Report Abuse |
|
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 03 Sep 2012 12:40 PM |
whenever someone mentioned jeff i was just like: I'm out q.q Cause he scares me ._. |
|
|
| Report Abuse |
|
|
dawgra
|
  |
| Joined: 31 Oct 2008 |
| Total Posts: 9877 |
|
|
| 03 Sep 2012 12:44 PM |
Modified one...
local ToLookFor = "Humanoid" -- If you want it to damage something other than Players
function OnTouched(hit) -- When the bullet is touched... local h = hit.Parent:findFirstChild(ToLookFor) -- find ToLookFor in the thing that was hit if h.Jeff.Value == false then h.Jeff.Value = true h.WalkSpeed = 15 h.Parent.Torso.Stun.Enabled = true script.Parent:Remove() -- remove the bullet wait(5) h.WalkSpeed = 20 h.Parent.Torso.Stun.Enabled = false h.Jeff.Value = false end
if h.Jeff.Value == true or h == nil then script.Parent:Remove() -- remove the bullet end end --end the if
script.Parent.Touched:connect(OnTouched) -- Connect the OnTouched function to the bullet.
19:44:04 - Script "Workspace.Bullet.BulletDamage", Line 5 19:44:04 - stack end 19:44:04 - Disconnected event because of exception |
|
|
| Report Abuse |
|
|
dawgra
|
  |
| Joined: 31 Oct 2008 |
| Total Posts: 9877 |
|
| |
|