#Hello ,just a beginner looking for some help!

200 messages · Page 1 of 1 (latest)

past spindle
#

what

#

ah

chrome pumice
#

@jovial moon Care to explain what questions you want answered?

Asking to ask isn't very cool!

wicked pike
#

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

jovial moon
#

Sorry for the confusion, i just need help with the basics

dawn prawnBOT
#

studio** You are now Level 1! **studio

jovial moon
#

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)

past spindle
jovial moon
#

may i get another example?

past spindle
#

loops can be used to repeat a block of code multiple times

jovial moon
past spindle
jovial moon
#

okay

jovial moon
jovial moon
past spindle
# jovial moon okay
function add(x, y)
    return x + y
end

print(add(1, 2)) -- prints 3
print(add(10, 20)) -- prints 30
jovial moon
#

oh thank god ,i read unction and i was like , What the hell is an unction 💀

jovial moon
#

aight

past spindle
#

while loops are another type of loop that runs a block of code when a certain condition returns True

jovial moon
#

example

#

?

past spindle
#

yep

#

it will replicate it so damn fast

jovial moon
#

isnt it needed for the normal loop too

#

only for while loops?

past spindle
#

😰

jovial moon
#

only for while loops?

#

ah

dawn prawnBOT
#

studio** You are now Level 2! **studio

jovial moon
#

i didnt mean that

#

i meant

#

should i use task.wait on only while loops or normal loops tooo

#

okay

past spindle
jovial moon
#

yeah

#

when you create a variable

#

you write

#

local Part = smth

past spindle
#

yep

jovial moon
#

im having trouble understanding what will "smth" be

past spindle
#

or local part = Instance.new("part")

jovial moon
#

like what should i write there

past spindle
#

let's say, there's a part in workspace inside a folder called Parts

#

it will be local part = game.workspace.Parts.Part

dawn prawnBOT
#

studio** You are now Level 6! **studio

jovial moon
#

okay

#

it does

#

this guy here

#

made variables

#

explain those

#

?

past spindle
jovial moon
#

table?

#

what is a table

past spindle
#

when you reference a GameService, you can use what the GameService provides, like TweenService provides the ability to make Animations

jovial moon
#

okay

jovial moon
#

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 : ...

▶ Play video
#

is this good

#

if i follow the whole playlist

past spindle
#

It's better to read documentation

#

yep

#

I would recommend checking out scripts from free models, and see how everything works

jovial moon
#

that sounds good

past spindle
#

tinker around with the script, edit and implement new stuff into it, etc

jovial moon
#

okay now a question

#

out of topic a bit

#

im just curious

timid condor
#

can someone help me?

past spindle
timid condor
#

I'm in big need of it

jovial moon
#

what you need

past spindle
jovial moon
#

the monster catching games

past spindle
#

yeah

jovial moon
#

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?

past spindle
#

depends how big it's gonna be

dawn prawnBOT
#

studio** You are now Level 5! **studio

timid condor
#

So can anyone help with that code?

jovial moon
timid condor
#

It's goood

past spindle
jovial moon
past spindle
jovial moon
#

like a simulator or a tycoon

#

yeah it is lol

#

i couldnt think of something smaller

#

link?

past spindle
#

I have a game that you might be interested in help making

jovial moon
#

o

past spindle
#

it might be a good start for you

jovial moon
#

yeah i would love to

past spindle
#

the game itself is Openworld exploration

#

there isn't any combat system or big boss fights

jovial moon
past spindle
#

sure

#

you guys know the game Sable?

jovial moon
#

nope

past spindle
#

it's something like this

#

explore, customize your character, talk with npcs, uncover the lore, etc

jovial moon
#

okay

#

basically an adventure game

past spindle
#

yes

jovial moon
#

so what you need help with

past spindle
#

you might think it will be easy, but man, for me it's hard

#

especially with raycasts

jovial moon
#

there is no way i can script that

dawn prawnBOT
#

studio** You are now Level 3! **studio

past spindle
#

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)
jovial moon
#

oh yes

#

simple

#

💀

past spindle
#

you only want to focus on scripting right?

jovial moon
#

yes

timid condor
#

How do I add weight to my animation script

#

?

jovial moon
#

make a post of yours

#

and ask anything ya want

timid condor
#

Chill

jovial moon
#

im chill xd

#

im just sayin

past spindle
#

I'm not the owner

#

hang on

jovial moon
#

running script

#

ehm

past spindle
#

you can get help from google too if you're stuck on anything

jovial moon
#

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?

past spindle
#

increasing speed

#

increasing speed should be easy?

#

you just need to change a property of the humanoid

jovial moon
#

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

jovial moon
#

do i make a loop

#

also where can i see all the properties for a humanoid

past spindle
jovial moon
#

ah

past spindle
jovial moon
#

Walkspeed

#

okay

#

humanoid.Walkspeed = 50

#

?

#

or or

#

i can store in a variable

#

local Run = humanoid.Walkspeed = 50

past spindle
#

this is correct.

jovial moon
#

LETS GO

past spindle
#

the s should be capital though

jovial moon
#

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

past spindle
jovial moon
#

you know smth

#

i will just go learn all the basics

#

through that website

past spindle
#

accept mines

#

on discord

#

I'm not the owner

#

I'm making a group chat so you can send the owner your roblox user