local player = game.Players.LocalPlayer
player.Changed:connect(function(propertyChanged)
if propertyChanged == player.Character then
print("The character changed! omigod")
if player.Character then --makes sure it isn't adjusting to a nil object!!!
local object = player.Character['COM'] --looks for COM, where the camera focuses.
if object then
game.Workspace.CurrentCamera.CameraSubject = object
else
print("ERROR!!!!!1")
end
end
end
end)
So basically what this script does is the following:
-Executes when a property of player changes -Checks if the propertyChanged argument is player.Character -Checks if the object exists in Workspace in the first place* -Sets local variable which uses the FFC method to look for a child named "COM" in the players char. -If it exists, then set the currentcamera focus to the object -Otherwise, produce an overwhelming error message
I tested it out, and it seems to have executed without any notation on what happened. The first print in the function .. ("The character changed! omigod") .. did not execute. Hence I assume that one of the errors is the if statement right after the function starts that checks if the propertyChanged argument is the player's character.
