#I need help, i want to create my first easy script, i'm a begginer and i need ideas!
354 messages · Page 1 of 1 (latest)
Elevator system
Elevator system
Yh should wrap up all basics and fundamentals
nice english
A moving platform
alr
Then add a button
Do you know any basics? Have you watched tutorials?
no
Then more buftons
Do u know programming basics
Then start by learning programming basics
You resigned or something?
Jus do some simple sh bro
it's s4
1º
alr
Nun much

He just prints to the console dont waste yo time 💔
Use the roblox documentation for classes and other stuff
They also have a get started thingy on the page
Jus search up roblox documentation
I mean if u knew few programming basics u could do this in less than a day
Its overall more precise
👍
@vague fossil
** You are now Level 7! **
i did this
is it going to work?
where
WOW
why?
what's the difference?
it worked
danm
thanks
is it easy to learn
?
alr
where i can
learn it
= for assignment
== for equality
OH
really?
i didn't know that
danm
thanks
ok
how can i move parts
like
i mean
what can be used to move parts
should i use MoveTo?
Parts has "Position" property
Part.Position = Vector3.new(x , y , z)
oh
no
wdym
like repeat whats inside
u can use loops
check this out
yup
this should wrap up most basics u need
u will find also few simple projects u can make

to make a smooth movement
for loops
theres a built in function called lerp
or u can use tweening
or
u can use for loops
the 3 methods i said
i don't want to do loops
while true do
for i = 1, 100 do
wait(0.1)
part.Position += Vector3.new(0,0.1,0)
end
for i = 1, 100 do
wait(0.1)
part.Position += Vector3.new(0,-0.1,0)
end
end
try this
what does that makes
smothly pushes it
also learn about cframes
not sure if its to fast tho
also lerp takes a second parameter
like this?
yes
o
.
wdym
u need a second parameter
how do i remove it
im pretty sure u can change it somewhere in settings
just consider the left side of the square
i'm talking about the white thing on wait(2)
yeah thats ur cursor
no
.
it indicates where ur gonna type, select, delete and so on
u can move it around
by clicking around the editor
or with arrow keys
goal should be a cframe
brother u said u need help. while hes doing the entire script
it's just an question
then what u did by yourself?
some parts of the script
i understand a bit of scripting
but i don't understand lerp
that's why i'm asking for zeroo's help
he explained like 200 times
the first parameter
askf fora a cframe
second ask for a number throught 0.1 , 1
what the hell is an parameter
if im not wrong
so
cframe
is like
vector 3?
wdym with the number 1
what does the number 1 do
1 means it goes all the way
if u put 0.5 it only goes halfway
not used it in a long time but i think thats what it does
remove the goal thingy
and the :
@fair turret i did this
local part = game.Workspace:WaitForChild("Part")
local goal = 1
while true do
part.Anchored = true
part.CFrame = part.CFrame:Lerp(CFrame.new(0, 10, 0), goal)
wait(2)
part.CFrame = part.CFrame:Lerp(CFrame.new(0, 0, 0), goal)
wait(2)
end
should work
smooth
wait a sec
i guess i will have to use tweenservice
@fair turret
** You are now Level 8! **
fixed
local TweenService = game:GetService("TweenService")
local part = game.Workspace:WaitForChild("Part")
while true do
local goalUp = {}
goalUp.Position = Vector3.new(0, 10, 0) -- Define o objetivo para cima
local TweenInfoUp = TweenInfo.new(0.5) -- Duração do tween para cima
local TweenUp = TweenService:Create(part, TweenInfoUp, goalUp)
TweenUp:Play() -- Reproduz o tween para cima
TweenUp.Completed:Wait() -- Aguarda até que o tween para cima termine
local goalDown = {}
goalDown.Position = Vector3.new(0, 0, 0) -- Define o objetivo para baixo
local TweenInfoDown = TweenInfo.new(0.5) -- Duração do tween para baixo
local TweenDown = TweenService:Create(part, TweenInfoDown, goalDown)
TweenDown:Play() -- Reproduz o tween para baixo
TweenDown.Completed:Wait() -- Aguarda até que o tween para baixo termine
end
it needs the alpha
wdym
okay
so
the way lerp works
is
you need your part
that you want to move
/anything
then you want 2 cframes
so
it calculates
all the positions in between part 2 and 3
and you can access
those cframes
by setting the alpha
a value which is 0-1
so like a percentage
lemme give an example script
local part1 = --part you want to move
local part2 = --start point
local part3 = --end point
for i = 0, 1, 0.01 do -- 0, 1 (this sets the start point and end point of this for loop), 0.01 (this is the step it takes every time it goes through the for loop till it reaches 1 so , 0.01, 0.02)
part1.CFrame = part2:Lerp(part3.CFrame, i) -- it makes the CFrame to i as the alpha
task.wait()
end
like the alpha think of it as a percentage
Isn’t the alpha set as goal?
Yeah
^ this is right
No you didn’t understand what I said
Look at their screenshot
They made a VARIABLE named goal and set it as 1 for the alpha
Lol
ohh mb
You good
they jus confused the name of the variable
overall its still the same tho no
?
yh
Yeah