of     1   

Laedere
#190785563Thursday, June 09, 2016 6:40 AM GMT

can someone give me an example of RenderStepped
Unclear
#190785611Thursday, June 09, 2016 6:42 AM GMT

-- In a LocalScript local perfectlySyncedSpinningPart = Instance.new("Part", workspace) perfectlySyncedSpinningPart.Anchored = true game:GetService("RunService").RenderStepped:connect(function(delta) perfectlySyncedSpinningPart.CFrame = perfectlySyncedSpinningPart.CFrame*CFrame.Angles(0, 2*math.pi*delta, 0) end) -- sorry this is messy, wrote this just now
Laedere
#190785633Thursday, June 09, 2016 6:43 AM GMT

ty
Unclear
#190785682Thursday, June 09, 2016 6:44 AM GMT

RenderStepped is an event that is triggered as fast as possible on the client. In other words, it runs each frame. It returns a single parameter (I refer to this parameter as delta). Delta is the time elapsed between the current RenderStepped frame and the last RenderStepped frame. The delta parameter is particularly useful because it allows you to run things in-sync with the client's frame rate (allowing for "smooth" animations and calculations). When you describe things as equations and set the equations in terms of delta, you can ensure that no matter what the client's frame rate is (slow or super fast), the animation plays in-sync with the amount of time that has elapsed in real life.
fireup12
#190785813Thursday, June 09, 2016 6:49 AM GMT

tbh unclear u taughtme something 2 day i nvr knew delta was provided by renderstepped ty
laframbroise
#190785843Thursday, June 09, 2016 6:50 AM GMT

have no idea what those words mean but ok ho ho ho
Theta0
#190786061Thursday, June 09, 2016 6:57 AM GMT

game:GetService("RunService").RenderStepped:connect(function(delta) perfectlySyncedSpinningPart.CFrame = perfectlySyncedSpinningPart.CFrame*CFrame.Angles(0, 2*math.pi*delta, 0) end) delta is in the first line you can name it whatever you want

    of     1