This script is with my game script in the StarterGui folder in the explorer inside a frame. 'Tick' is a soundtrack. Heres the script:
function Workspace.Map1.Touching.onTouched(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!" wait(5) end end
Apparently I have a red line on line 2. Why's that? If anybody knows, can you 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) Workspace.Tick:Play() Workspace.GUIPart.SurfaceGui.Frame.TextLabel.Text = "<[NamesNotImplementedYet]> Has Won The Round!" wait(5) end end)
Just needed to change the end
and the function
.