#I am new to scripting

70 messages · Page 1 of 1 (latest)

daring zodiac
#

Hi! I am new to scripting and am wondering how I can make a script so when they join my game they start at a certain size and decrease in size every second. Can someone help me with that please? Thank you

daring zodiac
#

anyone?

#

hello?

strange pebble
#

You can probably find a tutorial on how to change the player's size

daring zodiac
#

is that a normal script

#

or a module script

strange pebble
#

local script in starterCharacter

daring zodiac
#

ok

daring zodiac
#

i have made a variable for the amount of seconds you have been in the game for

#

how will I change it by one every second?

#

@strange pebble

#

is this how i make a variable

#

don

#

don't think this is correct

#

@strange pebble

#

?

strange pebble
#

local seconds = 0

#

seconds += 1

daring zodiac
#

thanks

strange pebble
#

"local seconds" would make seconds a bool value, but you want an intvalue so you need to do

var = [your number]

#

(without the brackets)

daring zodiac
#

im confused still

chrome steppeBOT
#

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

daring zodiac
#

is var "seconds"

#

as a placeholder

strange pebble
#

yes

chrome steppeBOT
#

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

daring zodiac
#

so "seconds = [number]"

#

so like this?

strange pebble
#

yep

daring zodiac
#

ok

#

now i just need to figure out how to change the height

#

how would i put this into my code

#

I put the size changing code code into a different script ServerScriptService

#

so the seconds variable doesn't apply

#

as you can see by the red underline

strange pebble
#

put the seconds variable inside the function

strange pebble
#

not +

daring zodiac
#

ok

strange pebble
#

additionally, what your current script does is change the player's size on join

#

not every second

#

It will also cap

daring zodiac
#

so like this?

#

i also moved the end) to the bottom

strange pebble
daring zodiac
#

i am trying to change it by 1 every second and also change the proportions of everyones avatars by seconds

strange pebble
#

also, consider watching basic scripting tutorials, I suggest AlvinBlox and Thedevking

daring zodiac
#

yeah

strange pebble
#

ima have to stop here because its 1 am here in argentina and my brain is fried

#

but one last thing

daring zodiac
#

ok

strange pebble
#

for those values "0.5" and "1.5" change them to variables

#

it'll help keep track of which value is which

daring zodiac
#

but there are multiple parts with 1.5

strange pebble
daring zodiac
#

oh ok

strange pebble
#

anyways, watch alvinblox and shit and you're welcome. peace 🥱

daring zodiac
#

one more thing

#

is this correct

strange pebble
#

cya

daring zodiac
#

ok

#

thanks