Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-7

An "If Statement"? (on my real account) [closed]

Asked by 9 years ago

Fight4money is here again! I yet again have a question about my to-be popular game called BLOX Halloween. Here it is: http://web.roblox.com/BLOX-Halloween-place?id=178897794 So, i want to add an if statement in the MainGameScript. So, i have a round in which there are players and a pathfinding ghoul in the map. I want it so when the players have all died, a gui would pop up saying that the ghoul won (i have the GUI) If there are still players left after the time limit, gui to pop up saying that the players won (i have this GUI too) This the snippet of code for that round, please say what I should add ti it to do this:

game.StarterGui.GameaGUIs.StatusTitle.Text = "Intermission"
wait (10)
game.StarterGui.GameaGUIs.StatusTitle.Text = "Game Chosen: Survive The Ghoul!"
wait (2)
game.Lighting.GhoulMap:clone().Parent = game.Workspace
wait (5)
target = CFrame.new(897, 755, -50)

wait(2)

for i, player in ipairs(game.Players:GetChildren()) do
    player.Character.Torso.CFrame = target + Vector3.new(0, i * 5, 0)
end
game.Lighting.GlobalShadows = true
game.Lighting.TimeOfDay = "00:00:00"
wait (200)
game.Workspace.GhoulMap:Destroy()

THE GAME WORKS I just need an if statement as said above.

0
By the way I have everything I mentioned except an "if" statement. fight4money -2 — 9y
2
First of all, nobody knows who you are. Second, why are you asking when you seem to know what you need to do? Tkdriverx 514 — 9y
0
Because i do not know how to do it, please do not be disrespectful in this wiki. fight4money -2 — 9y
2
An if statement should be easy enough looking at your level of script that you show us. If you think about it, it's not that hard. Octillerysnacker 115 — 9y
View all comments (2 more)
1
You say sound like you are famous and that you will be famous.. When you cant add an if statement? If you cant script you cant get famous, the end. Don't just think your great and better than everyone else. NinjoOnline 1146 — 9y
1
I put a moderation on this question for the Poster's protection due to the great deal of unsupportive reputation. I ask others who have community moderation privileges do the same as well. Thank you. M39a9am3R 3210 — 9y

Closed as Not Constructive by M39a9am3R, Perci1, and TheeDeathCaster

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
4
Answered by
Tkdriverx 514 Moderation Voter
9 years ago
if (condition) then
    -- code
end

Also try the wiki article.

1
I think this answer sums it up perfectly. RoboFrog 400 — 9y
0
thanks fight4money -2 — 9y
Ad