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: if problem?

Previous Thread :: Next Thread 
NinjaboySC is not online. NinjaboySC
Joined: 17 Sep 2010
Total Posts: 5738
15 Aug 2014 10:02 AM
if hit.Parent:findFirstChild("Humanoid") and if
script.Parent.HasBeenTouchedFor1st.Value = false then
a = hit.Parent.Name
(game.Players[a]:findFirstChild("place").Value == 1)
script.Parent.HasBeenTouchedFor1st.Value = true
end
end
end)

i have no idea why this doesnt work

the error occurs at the fist line of code
Report Abuse
NinjaboySC is not online. NinjaboySC
Joined: 17 Sep 2010
Total Posts: 5738
15 Aug 2014 10:37 AM
bump
Report Abuse
Mitko0o1 is not online. Mitko0o1
Joined: 30 Nov 2010
Total Posts: 5725
15 Aug 2014 10:39 AM
if hit.Parent:findFirstChild("Humanoid") and script.Parent.HasBeenTouchedFor1st.Value == false then
a = hit.Parent.Name
(game.Players[a]:findFirstChild("place").Value = 1)
script.Parent.HasBeenTouchedFor1st.Value = true
end
end
end)
Report Abuse
NinjaboySC is not online. NinjaboySC
Joined: 17 Sep 2010
Total Posts: 5738
15 Aug 2014 10:42 AM
errors at
(game.Players[a]:findFirstChild("place").Value = 1)
Report Abuse
VerifiedName is not online. VerifiedName
Joined: 26 Jul 2009
Total Posts: 4534
15 Aug 2014 10:43 AM
why the ()s
Report Abuse
Ahinax is not online. Ahinax
Joined: 07 Aug 2014
Total Posts: 746
15 Aug 2014 10:43 AM
This is messed up
show us the whole thing
Report Abuse
NinjaboySC is not online. NinjaboySC
Joined: 17 Sep 2010
Total Posts: 5738
15 Aug 2014 10:45 AM
it is the whole thing
Report Abuse
Ahinax is not online. Ahinax
Joined: 07 Aug 2014
Total Posts: 746
15 Aug 2014 10:46 AM
What are you trying to script?
this is messed up af
Report Abuse
Ahinax is not online. Ahinax
Joined: 07 Aug 2014
Total Posts: 746
15 Aug 2014 10:47 AM
(game.Players:findFirstChild(a):findFirstChild("place").Value == 1)

agh??
Report Abuse
NinjaboySC is not online. NinjaboySC
Joined: 17 Sep 2010
Total Posts: 5738
15 Aug 2014 10:48 AM
its supposed to be a checkpoint system that also checks to see what place you are in. HasBeenTouchedFor1st is a value that is checked when someone touches it first. it isnt the original code, i have edited it 'heavily'
Report Abuse
Ahinax is not online. Ahinax
Joined: 07 Aug 2014
Total Posts: 746
15 Aug 2014 10:49 AM
replace it with this

(game.Players:findFirstChild(a):findFirstChild("place").Value == 1)
Report Abuse
NinjaboySC is not online. NinjaboySC
Joined: 17 Sep 2010
Total Posts: 5738
15 Aug 2014 10:49 AM
i did and still errors
Report Abuse
Ahinax is not online. Ahinax
Joined: 07 Aug 2014
Total Posts: 746
15 Aug 2014 10:51 AM
output?
Report Abuse
NinjaboySC is not online. NinjaboySC
Joined: 17 Sep 2010
Total Posts: 5738
15 Aug 2014 10:55 AM
Workspace.Section1.place:5: ambiguous syntax (function call x new statement) near '('
Report Abuse
Waffloid is not online. Waffloid
Joined: 14 Jul 2011
Total Posts: 1606
15 Aug 2014 10:56 AM
if hit.Parent:findFirstChild("Humanoid") and script.Parent.HasBeenTouchedFor1st.Value == false then
a = hit.Parent.Name
game.Players[a]:findFirstChild("place").Value = 1
script.Parent.HasBeenTouchedFor1st.Value = true
end

~Swagilitious and not Nutricious~
Report Abuse
Ahinax is not online. Ahinax
Joined: 07 Aug 2014
Total Posts: 746
15 Aug 2014 10:58 AM
if hit.Parent:findFirstChild("Humanoid") then
if script.Parent.HasBeenTouchedFor1st.Value = false then
player = hit.Parent:GetPlayerFromCharacter()
val = (player:findFirstChild("place"))
val = 1
script.Parent.HasBeenTouchedFor1st.Value = true
end
end
end
end)
Report Abuse
Ahinax is not online. Ahinax
Joined: 07 Aug 2014
Total Posts: 746
15 Aug 2014 10:59 AM
@Waf

Players[a] is just like a table member

mine should work now
Report Abuse
NinjaboySC is not online. NinjaboySC
Joined: 17 Sep 2010
Total Posts: 5738
15 Aug 2014 11:01 AM
waffloid's does but yours deos not still.....
Report Abuse
NinjaboySC is not online. NinjaboySC
Joined: 17 Sep 2010
Total Posts: 5738
15 Aug 2014 11:02 AM
i need to ask of one more thing.

how does one add 1 to a value?
Report Abuse
Ahinax is not online. Ahinax
Joined: 07 Aug 2014
Total Posts: 746
15 Aug 2014 11:03 AM
if hit.Parent:findFirstChild("Humanoid") and script.Parent.HasBeenTouchedFor1st.Value == false then
a = hit.Parent.Name
game.Players[a]:findFirstChild("place").Value = game.Players[a]:findFIrstChild("place").Value + 1
script.Parent.HasBeenTouchedFor1st.Value = true
end
Report Abuse
NinjaboySC is not online. NinjaboySC
Joined: 17 Sep 2010
Total Posts: 5738
15 Aug 2014 11:05 AM
it does not work
Report Abuse
Ahinax is not online. Ahinax
Joined: 07 Aug 2014
Total Posts: 746
15 Aug 2014 11:05 AM
that's his script
how doesn't it work
Report Abuse
NinjaboySC is not online. NinjaboySC
Joined: 17 Sep 2010
Total Posts: 5738
15 Aug 2014 11:07 AM
i believe the value +1 is wrong....

maybe it needs ()'s...
Report Abuse
Ahinax is not online. Ahinax
Joined: 07 Aug 2014
Total Posts: 746
15 Aug 2014 11:07 AM
sourceofsomething.value = sourceofsomething.value + 1
that
easily
works
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