local part = script.Parent
local amplitude = 0.1-- how far up and down the part should move
local frequency = 0.5 -- how fast the part should move up and down
local angle = 0 -- variable to store the current angle of the part
while true do
angle = angle + math.rad(10) -- increase the angle by 10 degrees every frame
part.CFrame = part.CFrame * CFrame.Angles(0, math.rad(5), 0) -- rotate the part
part.CFrame = part.CFrame + Vector3.new(0, amplitude * math.sin(angle * frequency), 0) -- move the part up and down
wait() -- wait one frame before continuing the loop
end
and:
local part = script.Parent:FindFirstChild("Meshes/IceysAssetPack_Circle.008") -- the part that you want to spin
local part = script.Parent -- the part that you want to spin
local speed = 20 -- the speed at which you want the part to spin, in degrees per second
while true do
part.CFrame = part.CFrame * CFrame.Angles(0, math.rad(speed * game:GetService("RunService").Heartbeat:Wait()), 0)
end
We were arguing if itâs deprecated or not. Plus I am sure that it wouldnât have a huge difference in this case when he needs a much bigger value than even a second.
Even if itâs mentioned as deprecated as this is a newer function it still does not have the TAG deprecated and is not crossed and used much more by developers. Who would waste 2 more seconds to write (task.), I wouldnât neither most of the people who write code. Even the community knows that Programmers are lazy people and try to shorten the code they write.
It doesnât it even take 2 seconds to write out task.wait(). You shouldnât be using functions that are going to be deprecated in the future, and the point of doing a singular task.wait() is to wait a frame, and the smaller number it is, means itâs better for higher FPS.
Plus, you can always do this if youâre really desperate: local wait = task.wait
The warning is telling you that too many requests are being sent to the server.
Roblox throttles the datastore requests.
You should look into using throttling.