Im making a game for the inspire 2025, the bug is that when you scale the player (smaller) you can clip the camera trough the walls just like when using ShiftLock
local RunService = game:GetService("RunService")
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
local head = char:WaitForChild("Head")
local Camera = workspace.CurrentCamera
if player.Name ~= "michuchito" then return end
local raycastParams = RaycastParams.new()
raycastParams.FilterDescendantsInstances = {char,Camera}
raycastParams.FilterType = Enum.RaycastFilterType.Exclude
RunService.RenderStepped:Connect(function()
local result = workspace:Raycast(head.Position,Camera.CFrame.Position - head.Position, raycastParams)
if result then
Camera.CFrame = CFrame.new(result.Position)
end
end)
i tried this but its just… wrong