#help with math.noise

65 messages · Page 1 of 1 (latest)

regal radish
#

BRO

#

IM NOT ON THAT LEVEL YET

#

im sorry bro

#

u dont have to help me

#

but

#

ion know that stuff yet

#

but

#

yea no

#

😭

sonic bramble
#

Print z

#

Yes but maybe vector3 doesn't support numbers with too many decimals

regal radish
#

give me the script

#

put it down

#

in lua

sonic bramble
regal radish
#

u work on mine i work on yours

#

idk how to do noise

#

but i can try

#

to help at lwast

#

its not printing nun for me

#

i called the function

#

oh nvm

#

idk how return work either

#

yea

#

did that

#

it works

#

mb

#

i been coding too long to not learn wat return mean

#

i been searching that up for a while

#

anyways

sonic bramble
#
regal radish
#

can u explain tick too pls

#

yes

#

thanks

regal radish
#

because once i fill in a number for tick

#

it works

#

but

#

maybe tick aint tickin

sonic bramble
#

Tick is prob too big

sonic bramble
#

You cant pass number

regal radish
#

thats wshat i did

#

i think its z cant take allat

#

like bro sid

regal radish
#

its working

#

it did that not me

#

what

sonic bramble
#
--//Variables//
local Run = game:GetService("RunService")
local char = script.Parent
local camera = workspace.CurrentCamera

local amp = .5
local freq = .2

--//Functions//
local function GetRotation()
    local x = 0
    local y = 0
    local z = math.noise(tick()/10000*freq,0,0)*amp
    
    return Vector3.new(x,y,z)
end

local function SetCameraRotation(Rotation:Vector3)
    local CF = camera.CFrame
    
    local x,y,z = math.rad(Rotation.X),math.rad(Rotation.Y),math.rad(Rotation.Z)
    camera.CFrame *= CFrame.Angles(x,y,z)
    
    return camera.CFrame
end

--//Events//
Run.RenderStepped:Connect(function()
    SetCameraRotation(GetRotation())
    print(GetRotation())
end)
regal radish
#

no

#

bet

sonic bramble
#

Why do you use tick ?

#

but why do you need tick ? For a unique number ? ¯\_(ツ)_/¯

#

Use math.random

regal radish
#

yo

#

what does the math.noise do to

#

why not just do tick *******freq ******* amp

regal radish
#

w

#

bro.

regal radish
#

thats what i meant tho