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

Players.fshduia.PlayerGui.LocalScript:1: Expected '(' when parsing function, got ')'? [SOLVED]

Script: game.ReplicatedStorage:WaitForChild("Cutscene1")OnClientEvent:Connect(function) if script.Done.Value == false then script.Done.Value = true local camera = game.Workspace.CurrentCamera camera.CameraType = "Scriptable" camera:Interpolate(game.Workspace.part1.CFrame, game.Workspace.part2.CFrame, 2) wait(2) camera:Interpolate(game.Workspace.part2.CFrame, game.Workspace.part3.CFrame, 2) wait(2) camera:Interpolate(game.Workspace.part3.CFrame, game.Workspace.part4.CFrame, 2) wait(2) camera:Interpolate(game.Workspace.part4.CFrame, game.Workspace.part5.CFrame, 2) wait(2) camera:Interpolate(game.Workspace.part5.CFrame, game.Workspace.part6.CFrame, 2) wait(2) camera.CameraType = "Custom"

end

end)

Error comes up when trying to view cutscene.

1 answer

Hi. You forgot an ( at line 1 and a point between ("Cutscene1") and OnClientEvent

game.ReplicatedStorage:WaitForChild("Cutscene1").OnClientEvent:Connect(function() 
	if script.Done.Value == false then 
		script.Done.Value = true 
		
		local camera = game.Workspace.CurrentCamera 
		
		camera.CameraType = "Scriptable" 
		camera:Interpolate(game.Workspace.part1.CFrame, game.Workspace.part2.CFrame, 2) 
		wait(2) 
		camera:Interpolate(game.Workspace.part2.CFrame, game.Workspace.part3.CFrame, 2) 
		wait(2) 
		camera:Interpolate(game.Workspace.part3.CFrame, game.Workspace.part4.CFrame, 2)
		wait(2) 
		camera:Interpolate(game.Workspace.part4.CFrame, game.Workspace.part5.CFrame, 2) 
		wait(2) 
		camera:Interpolate(game.Workspace.part5.CFrame, game.Workspace.part6.CFrame, 2) 
		wait(2) camera.CameraType = "Custom"


	end
end)

4 comments

0

thanks! just going to try

0

This is happening now, Part1 is not a valid member of Workspace with your script

0

Oh sorry. I did it with capital letters. You have to change the P's of the part with a lowercase letter.

0

I found that out lol, thanks tho!

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