Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Why will my script not work? Using CFrame and RenderStepped [closed]

Asked by
Synth_o 136
6 years ago

My script, is supposed to make one brick move from one place to another smoothly

local RunService = game:GetService("RunService")

local Part = game.Workspace:WaitForChild("Part")
local End = game.Workspace:WaitForChild("End")

local PART_POS = Part.Position
local END_POS = End.Position
local DURATION = 5


RunService.RenderStepped:Connect(function()
    local deg = 180*(tick()% DURATION/DURATION
    Part.CFrame = CFrame.new(46, 61.5, -20) * CFrame.Angles(0,math.rad(deg),0) * CFrame.new(46, 61.5, 70)
end)

If you have any advice please comment.

0
???????? hiimgoodpack 2009 — 6y
0
A BodyVelocity gives a Part a constant velocity and ignores gravity xxracerdudexx 75 — 6y

Closed as Non-Descriptive by hiimgoodpack, Thetacah, lukeb50, and Void_Frost

This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.

Why was this question closed?