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: Y U NO work script?

Previous Thread :: Next Thread 
Drybones3363 is not online. Drybones3363
Joined: 16 Aug 2013
Total Posts: 1547
10 Feb 2014 07:50 PM
function ontouch(hit)
char = hit.Parent
player = game.Players:GetPlayerFromCharacter(char)
stats = player:findFirstChild("Lap/Checkpoints")
if stats.Lap.Value == 1 then
if stats.Checkpoint.Value == 4 then
stats.Lap.Value = 2
stats.Checkpoint.Value = 5
else
print 'working'
end
end
if stats.Lap.Value == 2 and stats.Checkpoint.Value == 8 then
stats.Lap.Value = 3
stats.Checkpoint.Value = 9
end
if stats.Lap.Value == 3 and stats.Checkpoint.Value == 12 then --win or end of racing
stats.Lap.Value = 0
stats.Checkpoint.Value = 0
char:MoveTo(Vector3.new(308.8, 1.8, 126.8))
Workspace.Values.Place.Value = Workspace.Values.Place.Value + 1
hint = Instance.new("Hint")
hint.Parent = Workspace
hint.Text = ("" ..player.Name.." Finished " ..Workspace.Values.Place.Value.." Of All!")
wait(5)
hint.Parent = nil
end
end

script.Parent.Touched:connect(ontouch)
Report Abuse
CeaselessSoul is not online. CeaselessSoul
Joined: 03 Jul 2012
Total Posts: 7506
10 Feb 2014 07:55 PM
CUZ IT NO WANT TO
Report Abuse
Drybones3363 is not online. Drybones3363
Joined: 16 Aug 2013
Total Posts: 1547
10 Feb 2014 07:58 PM
i have a script like this that works perfectly fine:
function ontouch(hit)
char = hit.Parent
player = game.Players:GetPlayerFromCharacter(char)
stats = player:findFirstChild("Lap/Checkpoints")
if stats.Lap.Value == 1 and stats.Checkpoint.Value == 2 then
stats.Checkpoint.Value = 3
end
if stats.Lap.Value == 2 and stats.Checkpoint.Value == 6 then
stats.Checkpoint.Value = 7
end
if stats.Lap.Value == 3 and stats.Checkpoint.Value == 10 then
stats.Checkpoint.Value = 11
end
end

script.Parent.Touched:connect(ontouch)

but not the one above :(
Report Abuse
Drybones3363 is not online. Drybones3363
Joined: 16 Aug 2013
Total Posts: 1547
10 Feb 2014 08:08 PM
bump
(i know i may not get an answer but thoughts are good enough for me)
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