Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

What Is My Mistake In This 'if' Statement Script?!

So I'm making an 'if' statement code with my game script, and so I want it to do is that when a person touches a part, all the players will spawn back to the lobby. Here was my attempt before I rage quitted:

wait(30)
Workspace.Tick:Play()
Workspace.GUIPart.SurfaceGui.Frame.TextLabel.Text = "No one has won? What a Pity..."
Workspace.Funny:Play()
for i, v in pairs(game.Players:GetPlayers()) do
pcall(function() v.Character.Torso.CFrame = CFrame.new(Vector3.new(63, 0, 100)) end) 
end
	wait(3)
end

elseif script.Parent.Parent.Parent.Character:OnTouched(Workspace.Map1.Touching)then
	for i, v in pairs(game.Players:GetPlayers()) do
pcall(function() v.Character.Torso.CFrame = CFrame.new(Vector3.new(63, 0, 100)) end) 
Workspace.Tick:Play()
Workspace.GUIPart.SurfaceGui.Frame.TextLabel.Text = "<[NamesNotImplementedYet]> Has Won The Round!"
wait(5)
	end

This script is inside the 'StarterGui' folder inside a frame. By the way, Tick is the sound. When I run this script, two things happen:

1.) It does not work. 2.) The output doesn't tell me where the error is.

Please help me :(

1 answer

Is that the full script? because you cannot start if statements with elseif. If this isn't the full script, please provide it.

1 comment

0

Theres the full script :)

This discussion is preserved as it was. New answers, comments, and votes are closed.