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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Need Help With This Script!

Previous Thread :: Next Thread 
RoboX790 is not online. RoboX790
Joined: 05 Nov 2009
Total Posts: 285
17 Dec 2013 09:49 AM
The Part of The Script Doesn't find the highest point on the leaderboard and gets stuck at "Round hs Ended!" any ideas? :/
the script : i've added '--' tags where the script starts and ends (the one that doesnt work)

local backup = game.Lighting.CarLevel1Black:clone()
local backup2 = game.Lighting.CarLevel1Blue:clone()
local backup3 = game.Lighting.CarLevel1Red:clone()
debounce = false
while true do
a = Instance.new("Hint", Workspace)
a.Text = "Loading Game..."
wait(2)
a.Text = "Data Persistence Loading..."
wait(2)
a.Text = "System Updating..."
wait(2)
a.Text = "Cars Regenerating..."
wait()
--Black Car Regeneration
game.Workspace.CarLevel1Black:Destroy()
local CarLevel1Black = backup:clone()
CarLevel1Black.Parent = game.Workspace
CarLevel1Black:MoveTo(game.Workspace.CarSpawn1.Position)
CarLevel1Black:MakeJoints()
debounce = false
--Blue Car Regeneration
game.Workspace.CarLevel1Blue:Destroy()
local CarLevel1Blue = backup2:clone()
CarLevel1Blue.Parent = game.Workspace
CarLevel1Blue:MoveTo(game.Workspace.CarSpawn2.Position)
CarLevel1Blue:MakeJoints()
debounce = false
--Red Car Regeneration
game.Workspace.CarLevel1Red:Destroy()
local CarLevel1Red = backup3:clone()
CarLevel1Red.Parent = game.Workspace
CarLevel1Red:MoveTo(game.Workspace.CarSpawn3.Position)
CarLevel1Red:MakeJoints()
debounce = false
wait(2)

lol = (math.random(1,1)) -- it will chose a number between 1-5
if lol == 1 then
b = Instance.new("Message", Workspace)
b.Text = "Loaded Game!"
a.Text = "The Person Who Collects The Most Points Wins!"
wait(5)
b.Text = "Get Ready!"
wait(1)
b.Text = "3"
wait(1)
b.Text = "2"
wait(1)
b.Text = "1"
wait(1)
b.Text = "Start!"
target = Vector3.new(-29.657, 2.5, 1340.248)
for i, v in pairs(game.Players:GetChildren()) do
v.Character.Torso.CFrame = CFrame.new(target + Vector3.new(0, i * 5, 0))
end
wait(3)
a:Remove()
b:Remove()
end
game.Workspace.Scriptme.Transparency = 1
game.Workspace.Scriptme.CanCollide = false
wait(60)
c = Instance.new("Message", Workspace)
c.Text = "Round has Ended!"
wait(1)



--THIS PART DOESN'T WORK :|
for i,v in pairs(game.Players:GetPlayers()) do
if v:findFirstChild("Points") then
if v.Points.Value > highestpoints then
highestpoints = v.Points.Value
highestplayer = v.Name
highestplayer.leaderstats.wins.value = wins.value + 1
wait(1)
local m = Instance.new("Message", Workspace)
m.Text = "The Winner Is: " ..v.Name.. " With: " ..v.Points.Value
else
m.Text = "The Game Is A Tie"
--script ENDS HERE ABOVE DOESNT WORK^^^




wait(3)
game.Workspace.Scriptme.Transparency = 0
game.Workspace.Scriptme.CanCollide = true
for i, k in pairs(game.Players:GetChildren()) do
hum = k.Character:findFirstChild("Humanoid")
hum.MaxHealth = 0
c:Remove()
end
end
end
end
end

I would really appreciate your help! :/
Report Abuse
RoboX790 is not online. RoboX790
Joined: 05 Nov 2009
Total Posts: 285
17 Dec 2013 09:55 AM
Ok to be more clear, the part that doesn't work needs to find the highest point collected on the leaderboard, and then find who collected it (player name) and then rewards him with a +1 win. but sadly the script gets stuck at c.Text = "Round has Ended!" and then skips the part that doesn't work, and then starts a new game.
Report Abuse
Emilhero123 is not online. Emilhero123
Joined: 10 Sep 2013
Total Posts: 18
17 Dec 2013 10:19 AM
u maked that big script ._.
Report Abuse
RoboX790 is not online. RoboX790
Joined: 05 Nov 2009
Total Posts: 285
17 Dec 2013 11:33 AM
one part doesn't work idk why ._.
Report Abuse
Emilhero123 is not online. Emilhero123
Joined: 10 Sep 2013
Total Posts: 18
17 Dec 2013 02:41 PM
do u checked everything?
Report Abuse
Emilhero123 is not online. Emilhero123
Joined: 10 Sep 2013
Total Posts: 18
17 Dec 2013 02:44 PM
is this a building script or what?
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