I have had luck getting the camera to shake the way I want, thanks to you guys for helping. But the script to get it to run in a certain area is not working. Here is what I have
script
function shake()
local players = game.Players:GetPlayers()
for i=1, #players do
local character = players[i].Character
local shakescript = character:FindFirstChild("ShakeScript")
if shakescript ~= nil then
shakescript.Disabled = false
end
end
end
script adder
local players = game.Players:GetPlayers()
for i=1, #players do
local player = players[i]
if player.Character ~= nil then
script.ShakeScript:clone().Parent = player.Character
end
end
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
script.ShakeScript:clone().Parent = character
end)
end)
local script
while true do
local cam = workspace.CurrentCamera
cam.CFrame = cam.CFrame*CFrame.Angles(math.random(-3,3)/360,math.random(-3,3)/360,math.random(-3,3)/360)
cam.FieldOfView = math.random(69,71)
wait()
end
The issue is I will use a region script and insert all of this into it and it just plays as soon as I start the game

2 comments
I put your code in a code block via selecting the code and clicking the blue Lua button. It is expected that you do this yourself next time. Also
camis a constant, so why is it in the while loop.I apreicate that, I will do that next time and im a new to scripting mathew420 provided me that last part of the script,I just didnt bother it the camera works, but I cant get this script to run in a specific area.