#Hello ,just a beginner looking for some help!
200 messages · Page 1 of 1 (latest)
@jovial moon Care to explain what questions you want answered?
Asking to ask isn't very cool!
you can see a variable like a box that holds a value inside
a function would be a variable that holds code that can be executed any number of time with different inputs
Sorry for the confusion, i just need help with the basics
** You are now Level 1! **
lemme ask more direct questions for everyone's sake
will try at least cuz idk much
How do parameters in functions work?
How do loops work ?
How do while loops work ?
(When i say how they work ,i mean how they are written ,what purpose they serve and when should i incorporate them in my script)
parameters are values that are passed to a function when it is called.
function greet(name)
print("Hello, " .. name .. "!")
end
may i get another example?
loops can be used to repeat a block of code multiple times
how do you create a loop
you can use while true do
okay
?
what about while loops
function add(x, y)
return x + y
end
print(add(1, 2)) -- prints 3
print(add(10, 20)) -- prints 30
oh thank god ,i read unction and i was like , What the hell is an unction 💀
💀
aight
while loops are another type of loop that runs a block of code when a certain condition returns True
local i = 1
while i <= 10 do
print(i)
i = i + 1
end
yep
it will replicate it so damn fast
😰
** You are now Level 2! **
i didnt mean that
i meant
should i use task.wait on only while loops or normal loops tooo
okay
was your questions answered correctly? if you understand it
yep
im having trouble understanding what will "smth" be
or local part = Instance.new("part")
like what should i write there
you write the directory of the Model or Part
let's say, there's a part in workspace inside a folder called Parts
it will be local part = game.workspace.Parts.Part
** You are now Level 6! **
local DataStoreService references a GameService called DataStoreService
when you reference a GameService, you can use what the GameService provides, like TweenService provides the ability to make Animations
is there somewhere that i can see all the services ,im supposed to learn them right
okay
or that
there are like hundreds of them
i know that site
In the third video of my Roblox scripting series we use what we have learnt so far to make a simple dice game, using referencing and properties. In the next videos we'll get into the good stuff, so don't give up, even if it seems boring.
Quiz - I am re-making my website currently so the quiz is unavailable. Please check back soon!
NEXT PART : ...
is this good
if i follow the whole playlist
Videos in my opinion, is a bad way to learn
It's better to read documentation
yep
I would recommend checking out scripts from free models, and see how everything works
that sounds good
tinker around with the script, edit and implement new stuff into it, etc
can someone help me?
😐
I'm in big need of it
what you need
yeah?
you know the game Loomian Legacy or doodle world maybe
the monster catching games
yeah
maybe you remember pokemon brick bronze
okay
my end goal is to make such a game
i know its gonna take a while
but how hard is it specifically?
depends honestly
depends how big it's gonna be
** You are now Level 5! **
So can anyone help with that code?
pretty big
It's goood
to start, do the small stuff first
like?
uh
like a simulator or a tycoon
yeah it is lol
i couldnt think of something smaller
link?
actually
I have a game that you might be interested in help making
o
it might be a good start for you
yeah i would love to
the game itself is Openworld exploration
there isn't any combat system or big boss fights
you sure i can script that
nope
Embark on a unique and unforgettable journey and guide Sable through her Gliding; a rite of passage that will take her across vast deserts and mesmerizing landscapes, capped by the remains of spaceships and ancient wonders.
it's something like this
explore, customize your character, talk with npcs, uncover the lore, etc
yes
so what you need help with
Climbing mechanic and sliding
you might think it will be easy, but man, for me it's hard
especially with raycasts
there is no way i can script that
** You are now Level 3! **
this is the current script for the sliding if ya'll were wondering
local player = game.Players.LocalPlayer
local character = player.Character
local humanoid = character:WaitForChild("Humanoid")
local rootPart = character:WaitForChild("HumanoidRootPart")
local slideDuration = 3
local slideSpeed = 0
local sliding = false
local function onSlope(position, direction)
local ray = Ray.new(position, direction)
local hit, pos, normal = workspace:FindPartOnRay(ray, character)
if hit and normal.y < 0.9 then
return math.deg(math.atan(normal.z))
end
return 0
end
local function updateSlide()
while sliding do
local angle = onSlope(rootPart.Position, Vector3.new(0, -1, 0))
if angle == 0 then
sliding = false
slideDuration = 3
slideSpeed = 0
humanoid:ChangeState(Enum.HumanoidStateType.Running)
else
slideDuration = math.min(slideDuration + 0.1, 5)
slideSpeed = math.min(slideSpeed + 0.1, 10)
rootPart.Velocity = Vector3.new(slideSpeed * math.cos(math.rad(angle)), 0, slideSpeed * math.sin(math.rad(angle)))
end
wait(0.1)
end
end
local function onKeyDown(input, gameProcessedEvent)
if gameProcessedEvent then return end
if input.KeyCode == Enum.KeyCode.Z then
local angle = onSlope(rootPart.Position, Vector3.new(0, -1, 0))
if angle ~= 0 and not sliding then
sliding = true
humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
humanoid:SetStateEnabled(Enum.HumanoidStateType.Freefall, true)
humanoid:PlayAnimation(character:WaitForChild("SlideAnimation"))
spawn(updateSlide)
end
end
end
game:GetService("UserInputService").InputBegan:Connect(onKeyDown)
yes
mate
make a post of yours
and ask anything ya want
Chill
the easiest thing for you to do is, making a running script
I'm not the owner
hang on
trust me, it's pretty easy
you can get help from google too if you're stuck on anything
so its better
if i first see the complete script
and then learn how to do it
instead of trying to do it without seeing the final version of it?
hm
increasing speed
increasing speed should be easy?
you just need to change a property of the humanoid
okay wait
i will try to do it
lemme open studio
StamatisYT
okay
also
on studio
i cant open it
unless i run as an admin
ehm
do i make a loop
also where can i see all the properties for a humanoid
nope, not really
ah
Humanoids are essentially used instances in Roblox and foundations for the bodies of characters. This tutorial explains the API and uses of functions, events, and properties. Basic properties & HumanoidRootPart Humanoid has the well known properties, Health, MaxHealth, and WalkSpeed. The default max health is 100 and default WalkSpeed is 16. W...
Walkspeed
okay
humanoid.Walkspeed = 50
?
or or
i can store in a variable
local Run = humanoid.Walkspeed = 50
LETS GO
the s should be capital though
oh yes
i would get an error and figure that out at some point
the real question is
how do you make it only when you press Shift to run
brb 10 mins