What is the issue? I don’t know why my script isn’t working.
What solutions have you tried so far? I tried to look at DevForum but i din’t found an solution.
local ShakeEvent = game.ReplicatedStorage.Events:WaitForChild("HyperScreenShake")
local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")
local StartTime = tick()
local EndTime = tick()
local xOffset = math.random(-505,505)/500
local yOffset = math.random(-505,505)/500
local zOffset = math.random(-505,505)/500
Humanoid.CameraOffset = Vector3.new(xOffset, yOffset, zOffset)
until EndTime - StartTime >= Time
Humanoid.CameraOffset = Vector3.new(0, 0, 0)
To add onto this, you should be using os.clock() instead of tick() because it has way more precision down to the nanoseconds. Next, you should be using task.wait() instead of wait() since it’s a lot more reliable and actually works with the task scheduler (and can have lower delays than wait). Now this one is optional but makes things look a little cleaner, but it’s generally better to use Vector3.zero if your gonna be making a zero vector. (much faster to access a property than to construct a whole new object)