i have a script that changes the camera but it doesn’t revert it back to normal when it’s supposed to
What Happens is it make you look around in the camera it sets to when the when it first changes the camera
Script:
i have a script that changes the camera but it doesn’t revert it back to normal when it’s supposed to
What Happens is it make you look around in the camera it sets to when the when it first changes the camera
Script:
by default the camerasubject is the humanoid of the local player, you are setting it to CurrentCamera
what do you mean by that, i don’t know how that will help me right now?
You dont need to have camera subjects here. I gather that you just want to the set the cam CFrame to the sleepcam part when you trigger the prompt and return it to normal when you click the textbutton. Just do this instead
local pp = workspace.Bed.I.ProximityPrompt
local plr = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
pp.Triggered:Connect(function(plr)
script.Parent.ScreenGui.Enabled = true
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = workspace.SleepCam.CFrame
end)
script.Parent.ScreenGui.TextButton.MouseButton1Click:Connect(function()
camera.CameraType = Enum.CameraType.Custom
script.Parent.ScreenGui.Enabled = false
end)
ok let me try it, give me a min
it works, thanks a lot. have a good day
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.