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

Players.recuazy.PlayerGui.MenuGui.CameraScript:18: Expected '(' when parsing function?n, got ')'

the code is here and i dont know how to fix this i have spent hours figuring this out pls help me

local player = game.Players.LocalPlayer local character = player.CharacterAdded local mouse = player:GetMouse() local camera = game.Workspace.CurrentCamera

local defaultCframe = camera.CFrame local view = 150 local Blur = game.Lighting.Blur

Blur.Size = 20

function updateCamera() camera.CFrame = game.Workspace.MenuCamera.CFrame end

game:GetService("RunService").RenderStepped:Connect(updateCamera)

script.Parent.TextButton.Mousebutton1Click:connect(function) wait(0.2) Blur.Size = 0 game.Workspace.MenuMusic:Stop() camera.CameraType = Enum.CameraType.Custom script.Parent.Frame:Destroy() script:Destroy() end)

1 answer

Try this:

local player = game.Players.LocalPlayer local character = player.CharacterAdded local mouse = player:GetMouse() local camera = game.Workspace.CurrentCamera

local defaultCframe = camera.CFrame local view = 150 local Blur = game.Lighting.Blur

Blur.Size = 20

function updateCamera() camera.CFrame = game.Workspace.MenuCamera.CFrame end

game:GetService("RunService").RenderStepped:Connect(updateCamera)

script.Parent.TextButton.Mousebutton1Click:connect(function()
	wait(0.2) 
	Blur.Size = 0 
	game.Workspace.MenuMusic:Stop() 
	camera.CameraType = Enum.CameraType.Custom 
	script.Parent.Frame:Destroy() 
	script:Destroy()
end)

Also you should highlight your questions

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