This is in a normal script inside the StarterGui folder inside a frame:
game.Workspace.Map1.Touching.Touched:connect(function(Touching) if Touching.Parent ~= nil 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!" Workspace.VictoryHappy1:Play() wait(10) end -- If I put a parentheses on this, I'll get a red line here. end -- If I put a parentheses on this, I'll get a red line here.
If I just leave them both with no parentheses I'll get a red line at line 2. Is it me or am I going crazy!? Can someone please help me :'(
game.Workspace.Map1.Touching.Touched:connect(function(Touching) if Touching.Parent ~= nil then for i, v in pairs(game.Players:GetPlayers()) do pcall(function() v.Character.Torso.CFrame = CFrame.new(Vector3.new(63, 0, 100)) end) end --You forgot the end for this loop. Workspace.Tick:Play() Workspace.GUIPart.SurfaceGui.Frame.TextLabel.Text = "<[NamesNotImplementedYet]> Has Won The Round!" Workspace.VictoryHappy1:Play() wait(10) end -- Since this isn't ending the function, no parenthesis. end) --This line should have the parenthesis to end the function.
You forgot to end the first if statement.
game.Workspace.Map1.Touching.Touched:connect(function(Touching) if Touching.Parent ~= nil 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!" Workspace.VictoryHappy1:Play() wait(10) end end end)