Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- assuming theres a the script is under a model
- local function GetBobbingCF(pet: Model, amplitude, frequency)
- local sine = amplitude * math.sin(time() * frequency) + amplitude
- local bobbingCF = pet:GetPivot():Lerp(CFrame.new(0, sine, 0), 0.1)
- return bobbingCF
- end
- local Pwet = script.Parent
- local amp = script.Parent.Amplitude
- local freq = script.Parent.Frequency
- while true do
- Pwet:PivotTo(GetBobbingCF(Pwet, amp.Value, freq.Value))
- task.wait()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement