You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? Keep it simple and clear!
I want to be able to change the CameraSubject to the player humanoid and it should work as expected.
What is the issue? Include screenshots / videos if possible!
When I assign CameraSubject to the players humanoid it doesn’t work as expected, but when I change it manually it works as expected.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve looked on the devforum for solutions and haven’t found any so far that have actually worked for me.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local humanoid = character:FindFirstChildOfClass("Humanoid")
if not humanoid then return end
workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
workspace.CurrentCamera.CameraSubject = humanoid
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
local character = game:GetService("Players").LocalPlayer.Character or game:GetService("Players").LocalPlayer.CharacterAdded:Wait()
local selectBtn = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("HUD"):WaitForChild("characterPicker").selectBtn
local camera = workspace.CurrentCamera
local function processCharacter()
-- Reverting The Camera Back To Normal And Removing The Blur Effect
local humanoid = character:FindFirstChildOfClass("Humanoid")
if not humanoid then return end
--if camera.CameraType ~= Enum.CameraType.Custom then return end
local blurEffect = camera:FindFirstChildOfClass("BlurEffect")
if blurEffect == nil then return end
blurEffect:Destroy()
local humanoid = character:FindFirstChildOfClass("Humanoid")
workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
workspace.CurrentCamera.CameraSubject = humanoid
end
selectBtn.MouseButton1Click:Connect(processCharacter)
local selectBtn = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("HUD"):WaitForChild("characterPicker").selectBtn
local camera = workspace.CurrentCamera
local player = game.Players.LocalPlayer
local function processCharacter()
-- Reverting The Camera Back To Normal And Removing The Blur Effect
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:FindFirstChildOfClass("Humanoid")
if not humanoid then return end
--if camera.CameraType ~= Enum.CameraType.Custom then return end
local blurEffect = camera:FindFirstChildOfClass("BlurEffect")
if blurEffect == nil then return end
blurEffect:Destroy()
local humanoid = character:FindFirstChildOfClass("Humanoid")
workspace.CurrentCamera.CameraType = Enum.CameraType.Custom
workspace.CurrentCamera.CameraSubject = humanoid
end
selectBtn.MouseButton1Click:Connect(processCharacter)