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

Camera not resetting after intro?

I've made an intro, and it's working fine, except it doesn't reset after the intro is finished, It's probably because of the coordinateframe, but that's needed otherwise it glitches... badly anybody got suggestions? Script (Just the resetting ):

	repeat wait() until player.Character or game:service'Players'.localPlayer.Character
	print'done'
	workspace.RESPAWNER:FireServer({player}) -- Respawns player
	workspace.CurrentCamera.CameraSubject=player.Character:WaitForChild"Humanoid"
	workspace.CurrentCamera.CameraType="Custom"
	print'yay all done ;D'
end

NOTE: This is a local in PlayerScripts.StarterPlayerScripts EDIT: It appears Custom doesn't work, but follow does if you reinsert the camera EDIT: I've made it work, but it appears that Custom doesn't work, but Track does, it isn't exactly like ROBLOX's one, but it's the best I've got, if someone can help me make Custom work, that'd be great

METHODS THAT DON'T WORK: Removing/Reinserting Camera (It breaks custom completely)

1 answer

Okay, here are your errors:

1.

game.Players, not game:service

2.

You need to do stuff like this: print("text"), not print'text'

3.

LocalPlayer, not localPlayer

4.

game.Workspace, not workspace.

5.

You don't need an end.

6.

Try deleting game.Workspace.CurrentCamera, then waiting 1 second. The camera re-inserts itself.

ALSO, line 3, you could just do game.Players.LocalPlayer.Character:BreakJoints(), because what you have doesn't make sense.

2 comments

0

no, it all works, it's just my syntax, and the end is needed because I check for a flag in player, localPlayer works, just workspace works, same with :service"". I'll try deleting and reinserting the camera ;p

0

I respawn the player because the player's character is :remove'd, just an update on that, and if I reinsert, Follow works, but not Custom

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