Advertisement
ERROR_CODE

Untitled

Oct 8th, 2023 (edited)
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. local camera = workspace.CurrentCamera
  2. local player = game.Players.LocalPlayer
  3. local character = player.Character
  4. local humanoid = character.Humanoid
  5.  
  6. -- camera settings
  7. player.CameraMaxZoomDistance = 0.5 -- force first person
  8. camera.FieldOfView = 100
  9. humanoid.CameraOffset = Vector3.new(0, 0, -1)
  10.  
  11. -- set and keep every body part Transparency to its real transparency
  12. for childIndex, child in pairs(character:GetChildren()) do
  13. if child:IsA("BasePart") and child.Name ~= "Head" then
  14.  
  15. child:GetPropertyChangedSignal("LocalTransparencyModifier"):Connect(function()
  16. child.LocalTransparencyModifier = child.Transparency
  17. end)
  18.  
  19. child.LocalTransparencyModifier = child.Transparency
  20.  
  21. end
  22. end
  23.  
  24. -- if the player steps in a vehicle
  25. camera:GetPropertyChangedSignal("CameraSubject"):Connect(function()
  26. if camera.CameraSubject:IsA("VehicleSeat") then
  27. camera.CameraSubject = humanoid
  28. end
  29. end)
  30.  
  31.  
  32. local CameraPart = Instance.new("Part")
  33. CameraPart.Parent = workspace
  34. CameraPart.Anchored = true
  35. CameraPart.Size = Vector3.new(4, 1, 2)
  36. CameraPart.CanCollide = false
  37. CameraPart.Position = Vector3.new(-20.182, 4.025, 241.055)
  38. CameraPart.Transparency = 1
  39. local player = game.Players.LocalPlayer
  40. local character = player.Character
  41. local cam = workspace.CurrentCamera
  42.  
  43. cam.CameraSubject = CameraPart
  44.  
  45.  
  46. wait(5)
  47. cam.CameraSubject = character
  48.  
  49.  
  50. --[[local Camera = game.Workspace.Camera
  51. Camera.CameraType = Enum.CameraType.Scriptable
  52. Camera.CFrame = CFrame.new(-20.182, 4.025, 241.055)]]--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement