RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"this clearly is not working, do you know how to get this done or not?"
Apologies for the confusion. It seems there was a formatting issue in the previous script. Here is the corrected version: ```lua -- server script local part = script.Parent local startPosition = part.Position local distance = 5 local speed = 0.05 -- Lower the speed more while true do local currentTime = tick() part.Position = startPosition + Vector3.new(math.sin(currentTime * speed) * distance, 0, math.cos(currentTime * speed) * distance) wait(0.1) end ``` In this script, the part will move in a circular pattern. The `math.sin` and `math.cos` functions are used to calculate the new position of the part in the X and Z axis respectively. The `tick` function is used to get the current time, and it's multiplied by the speed to create the movement effect. The `wait(0.1)` at the end of the loop is used to control the speed of the animation.