How Can I Make My Screen Shake? - Scripting Support - DevForum Home » How To Shake Camera Roblox » How Can I Make My Screen Shake? - Scripting Support - DevForum Maybe your like How To Shake Your Butt How To Shake Your Eyes How To Shake Your Hips How To Shape A Beret How To Shape Oval Nails How can I make my screen shake? Help and Feedback Scripting Support vuunie (vuunie) January 14, 2019, 1:41am 1 Hello. My goal is to make my screen shake whenever I click but nothing seems to be working properly. It only changes my CameraOffset once, but after that, it never moves. I’ve tried to ask other people but none have helped. I also tried to look at the Wiki for some information about the CameraOffset but nothing is helping. I’m pretty new to scripting tho. wait() local Player = game.Players.LocalPlayer local Char = Player.Character or Player.CharacterAdded:Wait() local Humanoid = Char.Humanoid local Enabled = true local Mouse = Player:GetMouse() local x = math.random(-100,100)/100 local y = math.random(-100,100)/100 local z = math.random(-100,100)/100 Mouse.Button1Down:connect(function() if not Enabled then return end Enabled = false for i = 1, 20 do Humanoid.CameraOffset = Vector3.new(x,y,z) print(i) wait() end Humanoid.CameraOffset = Vector3.new(0,0,0) Enabled = true end) 22 Likes Camera shake for combat ExtremeBuilder15 (ExtremeBuilder15) January 14, 2019, 1:45am 2 I think the problem is that x, y, and z never change. You give them a random value at the start of the script, but never change it after that. What you should be doing is generating a new x, y, and z each time you loop. for i = 1, 20 do local x = math.random(-100,100)/100 local y = math.random(-100,100)/100 local z = math.random(-100,100)/100 Humanoid.CameraOffset = Vector3.new(x,y,z) print(i) wait() end 64 Likes yellowinventor (yeIIow) January 14, 2019, 1:53am 3 Instead of using Humanoid.CameraOffset, try multiplying the Camera’s CFrame by some CFrame.Angles Value to achieve your desired effect. Heres a sloppy example: Mouse.Button1Down:connect(function() for i = 1,5 do workspace.Camera.CFrame = workspace.Camera.CFrame * CFrame.Angles(0.03,0,0) wait() for i = 1,5 do workspace.Camera.CFrame = workspace.Camera.CFrame * CFrame.Angles(-0.03,0,0) wait() end end) This script would shake your camera a tad bit when clicked. This sloppy example would look pretty clunky, but you could add your own effects to make it look better, i, e Different angles, exponentially getting smaller. However, if you only want to use Humanoid.CameraOffset, then all you need to do to make your camera return to its original state is to add another line of code like this: local x = math.random(-100,100)/100 local y = math.random(-100,100)/100 local z = math.random(-100,100)/100 for i = 1, 20 do Humanoid.CameraOffset = Vector3.new(x,y,z) print(i) wait() end for i = 1, 20 do -- second loop to return camera to original position Humanoid.CameraOffset = Vector3.new(-x,-y,-z) -- negating offset print(i) wait() end 13 Likes AbiZinho (Abi) January 14, 2019, 1:56am 5 coolkingll: Humanoid.CameraOffset = Vector3.new(0,0,0) I honestly think it would be a bit choppy if you just run this. I would consider something that would work smoother. I can’t think of any alternatives at the moment, but when I do, I’ll be sure to reply. 1 Like Fm_Trick (Trick) January 14, 2019, 2:01am 6 Check out @Crazyman32’s EZ Camera Shake module. It is very easy to use and performs great looking and efficient shakes. 10 Likes liuthemoo (liuthemoo) January 14, 2019, 2:09am 7 Documentation - Roblox Creator Hub Use random.new() instead of math.random, which requires a seed to be inputted instead of random.new(), where if no parameters are given, will automatically put in a new randomized seed. colbert2677 (ImagineerColbert) January 14, 2019, 2:13am 8 I’m pretty sure math.random() was updated to use the same algorithm as Random.new(). The difference is that Random sports slightly more capabilities while math.random() is anchored to either a 0-1 value or a minimum and maximum. math.randomseed() is no longer a requirement. What's the point of Random.new():NextNumber()? Random vs. math.random()? SummerEquinox (Riley) January 14, 2019, 2:14am 9 This is correct I think; I’ve been told math.random uses the Random class under the hood. Either way bringing up math.random versus Random.new() seems like a non-point in the scheme of this thread. 3 Likes AbiZinho (Abi) January 14, 2019, 2:17am 10 You can consider this randomizing method if you want to achieve what you want. This is specifically indicated for table values, but it can be used regardless. liuthemoo (liuthemoo) January 14, 2019, 2:18am 11 Ah, my mistake. I’ll just go ahead and delete my useless post now… 1 Like colbert2677 (ImagineerColbert) January 14, 2019, 2:21am 12 It’s not that you have to delete your post if you’re wrong - the DevForum is a learning resource and a discussion platform. There are things you and I both don’t know. You didn’t know before, you know now. The point was relatively relevant in terms of what can be used to achieve a random effect (which is part of what OP requires, a way to fetch random numbers, so that it can be applied to a loop of some sort to make their screen shake). Just remember to stay on-topic and work towards helping OP find a solution. 5 Likes yellowinventor (yeIIow) January 14, 2019, 2:22am 13 As a general note, you probably should’nt delete your posts that were involved in a conversation since they add to the conversation of the post. 1 Like liuthemoo (liuthemoo) January 14, 2019, 2:24am 14 Oh okay sorry I’m really new to this. How would I go about undeleting a post? Edit : Found the button vuunie (vuunie) January 14, 2019, 2:41am 15 Thanks! That worked. vuunie (vuunie) January 14, 2019, 2:42am 16 I will definitely try that out and see what happens. vuunie (vuunie) January 14, 2019, 2:43am 17 It looks really great but how do you go about using it? I’m still pretty new to all this stuff so I wouldn’t know where to put all the scripts just yet. AbiZinho (Abi) January 14, 2019, 2:44am 18 Examples are given in the post, as well as in the comments. AbiZinho (Abi) January 14, 2019, 2:48am 19 If you are talking about where the ModuleScript is supposed to be, you just need to put it where a localscript can require it. For instance, ReplicatedStorage would be a suitable place. AbiZinho (Abi) January 14, 2019, 2:53am 20 Make sure to put @ExtremeBuilder15 's answer as the solution if it worked! 1 Like vuunie (vuunie) January 14, 2019, 3:00am 21 Oh thank you ill try out that soon. Thanks for yhe heads up. next page → Tag » How To Shake Camera Roblox Camera Movement For Camera Shake - Scripting Support - DevForum EZ Camera Shake Ported To Roblox - Community Resources How To Make A Camera Shake In Roblox Studio - YouTube How To Make A Camera Shake Effect In Roblox Studio - YouTube How To Do Explosion Camera Shake In Roblox! - YouTube [CHECK DESCRIPTION FOR IMPROVED VERSION] How To Make A ... How To Make A Camera Shake / Bobble Effect In Roblox Studio HOW TO MAKE SCREEN SHAKE WHILE RUN/WALK - YouTube How Do I Make A Server Sided Camera Shake? - Scripting Helpers CameraShaker - AeroGameFramework - Sleitnick How To Make Your Camera Shake When Youre Doing A Roblox Tik Tok ... What's The Best Possible Way To Make A "camera Shake" Tool In Studio? Osyrisrblx/rbxts-camera-shaker: Roblox-ts Package For ... - GitHub Roblox Static Effect