aheberle
|
  |
| Joined: 12 Mar 2011 |
| Total Posts: 1028 |
|
|
| 17 Oct 2011 11:32 AM |
Function = OnTouched (hit) Connect If=Player {"Player"}then Ban = True else Ban = False
Function OnTouched (hit) If=Ban = True then Workspace.Player.head:remove else CanCollide = False wait(1) end Function OnTouched (hit)
This script goes inside of an object and if a specific Player touches it they die, my output keeps coming up as this: "=" expected near "If" I put it next to both ifs with both ways, spaced and not PLEASE HELP!!!!!!!! |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 17 Oct 2011 11:34 AM |
You can use output but you cannot script? Thats weird... |
|
|
| Report Abuse |
|
|
MrChubbs
|
  |
| Joined: 14 Oct 2010 |
| Total Posts: 4969 |
|
|
| 17 Oct 2011 11:35 AM |
When there is an if you add two Equals, if hit.Name == "Cheese" then end this works if hit.Name = "Cheese" then end this does not and will print "=" expected near "If"
|
|
|
| Report Abuse |
|
|
aheberle
|
  |
| Joined: 12 Mar 2011 |
| Total Posts: 1028 |
|
|
| 17 Oct 2011 12:03 PM |
sooo
Function = OnTouched (hit) Connect If Player == {"Player"}then Ban = True else Ban = False
Function OnTouched (hit) IfBan == True then Workspace.Player.head:remove else CanCollide = False wait(1) end Function OnTouched (hit)
Like that? |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 17 Oct 2011 12:04 PM |
Player isn't defined Player wouldn't be string (It would be better if you would set the Ban=false at the start) and Function can't be with "F", there's so much errors i cant list them... |
|
|
| Report Abuse |
|
|
aheberle
|
  |
| Joined: 12 Mar 2011 |
| Total Posts: 1028 |
|
| |
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 17 Oct 2011 12:07 PM |
| But you didn't defined it and there is SOOO much errors so i could even make a book of it "1000 And 1 Errors in 1 Script" |
|
|
| Report Abuse |
|
|
aheberle
|
  |
| Joined: 12 Mar 2011 |
| Total Posts: 1028 |
|
|
| 17 Oct 2011 12:07 PM |
Function = OnTouched (hit) Connect If hit.name == Player then Ban = True else Ban = False
Function OnTouched (hit) If Ban == True then Workspace.Player.head:remove else CanCollide = False wait(1) end Function OnTouched (hit)
|
|
|
| Report Abuse |
|
|
aheberle
|
  |
| Joined: 12 Mar 2011 |
| Total Posts: 1028 |
|
|
| 17 Oct 2011 12:08 PM |
| Theres not even that meany letters in the script lul |
|
|
| Report Abuse |
|
|
myrco919
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 13241 |
|
| |
|
myrco919
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 13241 |
|
| |
|
aheberle
|
  |
| Joined: 12 Mar 2011 |
| Total Posts: 1028 |
|
|
| 17 Oct 2011 12:11 PM |
| Wiki is confusing past the first few totorials, instead ill go join a Lua group |
|
|
| Report Abuse |
|
|
su8
|
  |
| Joined: 06 Mar 2009 |
| Total Posts: 6334 |
|
|
| 17 Oct 2011 12:11 PM |
I "Fix" it now (That way i think it should work)
script.Parent.Touched:connect(function(tc) if tc.Parent.Name == "YourNameOrAdmin" then ban = false else ban = true end game.Workspace.Part.Touched:connect(function() if ban then tc.Parent.Head:remove() end end) end)
|
|
|
| Report Abuse |
|
|
|
| 17 Oct 2011 12:13 PM |
There's really nothing right with the script except the ==. What exactly do you want it to do?
~ AFT, wrongfully banned ~ |
|
|
| Report Abuse |
|
|
myrco919
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 13241 |
|
| |
|
|
| 17 Oct 2011 12:14 PM |
Late...so late...
~ AFT, wrongfully banned ~ |
|
|
| Report Abuse |
|
|
myrco919
|
  |
| Joined: 12 Jun 2009 |
| Total Posts: 13241 |
|
| |
|
|
| 17 Oct 2011 12:16 PM |
@myrco: Lolwut???
~ AFT, wrongfully banned ~ |
|
|
| Report Abuse |
|
|