Passed value is not a function?

so I’m trying to make this function run when the player joins but when i press play i get this error.

image

even though it displays this error message, the code still works but it must mean I’m doing something incorrectly.

function cutscene()
	camera.CameraType = Enum.CameraType.Scriptable

	blackFrame.Visible = true

	camera.CFrame = camFolder:WaitForChild("cam5").CFrame
	task.wait(2)
	ts:Create(blackFrame,tween1,{BackgroundTransparency = 1}):Play()
	ts:Create(camera,tween3,{CFrame = camFolder.cam6.CFrame}):Play()
end

game.Players.PlayerAdded:Connect(cutscene())

any help would be appreciated!

1 Like

when using connect you dont call the function inside the connect statement like game.Players.PlayerAdded:Connect(cutscene()) instead you would connect the function to the event like game.Players.PlayerAdded:Connect(cutscene)

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.