Yep, I assume that would fix the problem.
Alright so I tried that and things lead to another and I made another script, heres that script:
local Camera = workspace.CurrentCamera
script.Parent.MouseButton1Click:Connect(function()
local plr = game.Players.LocalPlayer.Name
local player = game.Workspace:FindFirstChild(plr)
Camera.CameraSubject = player.Humanoid
end)
I made a bigger problem, because thatâs what I do. But now it made an output error:
ActivateCameraController did not select a module.
That came from the camera module, btw
Oh yea forgot the wait() before the gui changing didnât work, sorry about that
local Camera = workspace.CurrentCamera
script.Parent.MouseButton1Click:Connect(function()
local plr = game.Players.LocalPlayer.Name
local player = game.Workspace:FindFirstChild(plr)
Camera.CameraSubject = player.Humanoid
end)
This code has a few problems. First of all, when youâve referenced plr, youâve referenced the name. Second of all, you are not referencing the character at all.
Hereâs your improved code:
local Camera = workspace.CurrentCamera
script.Parent.MouseButton1Click:Connect(function()
local plr = game.Players.LocalPlayer
local character = plr.Character or plr.Character:Wait()
Camera.CameraSubject = character.Humanoid
end)
1 Like