Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Making it so i cant move or zoom?

2 answers

change the number 25 to the zoom distance you want

game.StarterPlayer.CameraMaxZoomDistance = 25

this should work, i have used it before

1 comment

0

make sure to change the camera type to scirptable

To stop the zoom, I'd set the CameraMaxZoomDistance to be the same number as the CameraMinZoomDistance, this is easily done in the 'StarterPlayer' service. For stopping player movement, I'd just anchor the player's torso (Head is best since r15 has different names and stuff like that), that should do it.

-- for r6
game:GetService("Players").PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function(character)
		local torso
		repeat
			torso = character:FindFirstChild("Torso")
			wait(0.1)
		until torso ~= nil
		torso.Anchored = true
	end)
end)

-- for r15
game:GetService("Players").PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function(character)
		local head
		repeat
			torso = character:FindFirstChild("Head")
			wait(0.1)
		until head ~= nil
		head.Anchored = true
	end)
end)

And if you're also wanting to know how to stop the movement of the camera, gimme a comment and I'll try and figure out a solution for ya.

This discussion is preserved as it was. New answers, comments, and votes are closed.