local E = true
script.Parent.Activated:Connect(function()
print([==[You
Are
Using
The
Camera
To
Spy
On
Others?
Shame
On
You
PotatoHead]==])
E = not E
if not E then
cam.CameraType = Enum.CameraType.Fixed
cam.CameraSubject = nil
cam.Focus = CFrame.new(mouse.Hit.p)
else
cam.CameraType = Enum.CameraType.Custom
cam.CameraSubject = player.Character.Humanoid
end
end)
If i click on the ground I can’t look around or zoom in or out. This was not the case a while ago, any help?
sorry for the long reply, actually i got it working by setting just the camera subject to a part instanced to workspace and setting its cframe and position to the mouse hit position and destroyed the part right after setting the camera subject.
tool.Activated:Connect(function()
E = not E
if not E then
local part = game.ReplicatedStorage.TpCamPart:Clone()
part.CFrame = CFrame.new(mouse.Hit.p)
part.Parent = workspace
cam.CameraSubject = part
part:Destroy()
else
cam.CameraSubject = player.Character.Humanoid
end
end)
Yes. First call the function, then name it. After that you need to add an event (if player did something, then do that service) Edit: If you need to start this when player joined, add an On Player Entered (join) event