Answered by
5 years ago Edited 5 years ago
You want to have timer change by speed to get the result you want. Otherwise, by multiplying the argument of math.cos by speed, you simply change the starting position of the cosine graph (try twiddling around with (y = cos(x - 1 * d * 15) in desmos. You ideally want a script that looks like this.
01 | Pos = script.Parent.Position |
06 | X = Pos.X+Radius*math.cos(Timer- 1 *Spd* 15 ) |
07 | Z = Pos.Y+Radius*math.cos(Timer- 11 *Spd* 15 ) |
08 | script.Parent.Position = Vector 3. new(X,Pos.Y,Z) |
09 | Timer = Timer + Spd/ 10 |
Furthermore, based on what you described, this script should be in a local script. Thus to update the animation every frame to make it look way smoother, use https://developer.roblox.com/en-us/api-reference/event/RunService/Heartbeat instead of wait(0.1)