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: HELP!!!

Previous Thread :: Next Thread 
aheberle is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. aheberle
Joined: 12 Mar 2011
Total Posts: 1028
17 Oct 2011 12:06 PM
Player would be a person
Report Abuse
su8 is not online. 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 is not online. 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 is not online. 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 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
17 Oct 2011 12:09 PM
[ Content Deleted ]
Report Abuse
myrco919 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
17 Oct 2011 12:10 PM
[ Content Deleted ]
Report Abuse
aheberle is not online. 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 is not online. 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
AverageForumTrollJr is not online. AverageForumTrollJr
Joined: 14 Apr 2011
Total Posts: 182
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 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
17 Oct 2011 12:13 PM
[ Content Deleted ]
Report Abuse
AverageForumTrollJr is not online. AverageForumTrollJr
Joined: 14 Apr 2011
Total Posts: 182
17 Oct 2011 12:14 PM
Late...so late...


~ AFT, wrongfully banned ~
Report Abuse
myrco919 is not online. myrco919
Joined: 12 Jun 2009
Total Posts: 13241
17 Oct 2011 12:16 PM
[ Content Deleted ]
Report Abuse
AverageForumTrollJr is not online. AverageForumTrollJr
Joined: 14 Apr 2011
Total Posts: 182
17 Oct 2011 12:16 PM
@myrco: Lolwut???


~ AFT, wrongfully banned ~
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