|
| 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 |
|
|
| |
|
|
| 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 |
|
|
|
| 10 Feb 2014 08:08 PM |
bump (i know i may not get an answer but thoughts are good enough for me) |
|
|
| Report Abuse |
|
|