Why wouldn't the Camera's Subject be focused on the truss? Here is the Code:
local cam=workspace.CurrentCamera local button=game.Players.LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("ScreenGui") -- In Line 2 SH cut off :WaitForChild("ScreenGui") game.Players.PlayerAdded:connect(function(plr) cam.CameraSubject=workspace:FindFirstChild("Truss") end) button.TextButton.MouseButton1Down:connect(function() cam.CameraSubject=plr.Character:WaitForChild("Humanoid") end)
This Error kept popping up in the Output
Please Respect that I am a Beginner.
Make a LocalScript in the Backpack
local player = game.Players.LocalPlayer cam = game.Workspace.CurrentCamera player:WaitForChild("PlayerGui"):WaitForChild("ScreenGui"):WaitForChild("TextButton").MouseButton1Down:connect(function() cam.CameraSubject = player.Character.Humanoid end) cam.CameraSubject = game.Workspace:FindFirstChild("Truss")
When you use the MouseButton1Down event on a TextButton, the 2 arguments in the function are where on the button it was clicked, not the player. Try doing this:
button.TextButton.MouseButton1Down:connect(function(X, Y) cam.CameraSubject=game.Players.LocalPlayer.Character:WaitForChild("Humanoid") end)