#I wanna make it so when you join the game it randomizes all of the body colors of a starter char.

1 messages · Page 1 of 1 (latest)

knotty anchor
#

I have a model of a starter character who is completly black, but i wanna make it so when a new player joins a random color is given to them, covering their entire body, im new to this so pls explain like apples and bananas

tulip waveBOT
#

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

karmic pilot
#

Detect a join, and change the body colors?

knotty anchor
#

of the

#

person who joins

#

uhuh

karmic pilot
#

Look it up

#

And then inside that function, detect when their character gets added

knotty anchor
#

dude.

#

....

#

-...

#

how

karmic pilot
#

It’s hard to explain to people who don’t even try

knotty anchor
#

im new to this man

#

dont expect me to code the all of super mario bros

karmic pilot
#

I said look it up

#

I‘m not gonna explain you brick by brick how it works

knotty anchor
#

: (

karmic pilot
#

Do you at least have a StarterCharacter?

knotty anchor
#

yes the thing u turn into

#

when u join

karmic pilot
#

And you did put that in StarterPlayer?

knotty anchor
#

yes

karmic pilot
#

Okay, does it have a BodyColor in it?

knotty anchor
#

yes

#

og wait

#

wait

#

no

#

its brick color

#

what each piece has

karmic pilot
#

You can work that out with BodyColors

turbid goblet
#

then chnage it to Color3.fromRGB(math.random(0, 255), math.random(0, 255), math.random(0, 255))

karmic pilot
#

Yes

knotty anchor
#

apples and bananas man

#

: (

karmic pilot
#

Can‘t help someone who doesn’t try

#

Search up the root

#

You got our explanation

knotty anchor
#

if i wasnt trying

#

i would have used the toolbox

#

but no

#

i am trying to learn

karmic pilot
#

Tuff

knotty anchor
#

so pls

#

explain

karmic pilot
#

Well

#

A game has players

#

So there is a players service

#

Create a server script under the StarterCharacter

#

When you add them they are just called „Script“

knotty anchor
#

ok ok

tulip waveBOT
#

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

knotty anchor
#

did so

karmic pilot
#

local character = script.Parent
local humanoid = character.Humanoid

local description = humanoid:GetAppliedDescription()

local function randomColor()
return Color3.fromRGB(
math.random(0, 255),
math.random(0, 255),
math.random(0, 255)
)
end

description.HeadColor = randomColor()
description.TorsoColor = randomColor()
description.LeftArmColor = randomColor()
description.RightArmColor = randomColor()
description.LeftLegColor = randomColor()
description.RightLegColor = randomColor()

humanoid:ApplyDescription(description)

Paste this code and ask if you don’t understand anything, but I believe it works

#

Although you don’t know how to code

#

Luau is easy to understand

knotty anchor
#

o

#

ok

#

like

#

just like that

rugged folio
#

wont automatically do it whenever someone spawns

karmic pilot
#

Oh yeah

rugged folio
#

you can probably detect a player spawning with workspace.ChildAdded

karmic pilot
#

You gotta connect it to when a player joined

#

And then when it’s character joins

rugged folio
#

and if that part has, something only a player has, like the Animate script, THEN change the colors

karmic pilot
#

Isn’t it easier?

rugged folio
#

i think

knotty anchor
#

😀

karmic pilot
tulip waveBOT
#

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

rugged folio
#

you could do PlayerAdded(CharacterAdded() but i think thats like chaining events and bad and stuff

karmic pilot
#

Which gets called whenever that player basically spawns

rugged folio
#

that does work

#

either works really

karmic pilot
#

Chaining other events can cause that

#

But this should not run forever

#

If you mean that

rugged folio
#

specifically that combination?

karmic pilot
#

I guess so yeah

#

It’s the easiest way to get the joined players character on the server

#

Maybe also the only

rugged folio
#

i usually prefer ChildAdded on the workspace only because it just feels cleaner with only one event

knotty anchor
#

uh

karmic pilot
#

Acrually smart

rugged folio
#

check if the Animate script is a child of the model

karmic pilot
#

You can just check if the child that was added is also child of the Players

rugged folio
#

thats all you need

karmic pilot
#

Could error

#

But should work

rugged folio
#

no, :FindFirstChild() will return nil if a child doesnt exist

karmic pilot
rugged folio
#

and then you can do like part:FindFirstChild(“Animate”) == nil

karmic pilot
#

The player is stored in the Players simultaneously

rugged folio
#

player CHARACTER and player itself is different i think

karmic pilot
#

Yes

rugged folio
#

its a different type of instance

karmic pilot
#

But by getting the player in the PlayersService you get access to their character and a lot more

#

Just saying

karmic pilot
#

But I get what you mean

rugged folio
#

everything in the explorer is an instance except for the main things that are direct children of the game i think

#

those things are services instead

karmic pilot
#

Yeah

rugged folio
#

PointLight is an instance, Attachment is an instance, Humanoid is an instance, nearly everything is an instance

karmic pilot
#

The player in the workspace is usually a model

rugged folio
#

even things you’d think arent

karmic pilot
#

I haven’t used it much

rugged folio
#

with a Humanoid which makes it a rig

karmic pilot
#

Idk if that’s a instance

rugged folio
#

let me google it

karmic pilot
karmic pilot
#

Would make sense too

rugged folio
#

object = instance

karmic pilot
#

Okay

#

Nice to learn that

#

I think of instances something we can also add you know

#

But no

rugged folio
#

players are special things

karmic pilot
#

But Roblox doesn’t treat us like that

knotty anchor
#

🙂

rugged folio
#

i dont know if you can simulate one being added even if one doesnt by creating a player instance

#

even then i dont see much use for that

karmic pilot
#

But I‘d recommend you getting the player on the server by the inbuilt .Added and then player.CharacterAdded

#

On the client no need of course

rugged folio
#

i know Cameras are weird tho

knotty anchor
#

what

rugged folio
#

ok to get whenever player joins lemme write the script

karmic pilot
#

I‘m confident it will work with the right set-up

#

That I forgot

#

-# (unedited)

rugged folio
#

game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
—code to mess with character here
end)
end)

knotty anchor
#

what do i

#

do

#

do i

karmic pilot
#

From then you can mess with that characters BodyColors

rugged folio
#

put his script in the thing that says code to mess with character here

knotty anchor
#

do

#

do i keep the

rugged folio
#

should work no guarentees

knotty anchor
#

--

karmic pilot
#

But please define Players

rugged folio
knotty anchor
#

I dont know how to

rugged folio
#

do you know what that is???

knotty anchor
#

I DONT KNOW ANYTHING

karmic pilot
#

Just for optimization

knotty anchor
#

did u

#

did u two

#

not read

rugged folio
#

learn before making a game broocrying

knotty anchor
#

the message

#

it says

#

"apples and bananas"

rugged folio
#

if you dont know smth this simple then learn for a bit longer before making a game

karmic pilot
#

Could’ve read our messages to understand

rugged folio
#

its a mistake i made

karmic pilot
#

We legit talked about how to get the player and then extended the code for you to use

rugged folio
#

i got straight to making a game and scrapped like five

knotty anchor
#

i did a lot on this game

#

this is just something i didnt know

rugged folio
#

released one, got 2k visits, made it horribly and never updated it again

karmic pilot
rugged folio
#

this is TOO simple brocrying

karmic pilot
#

Not something you don’t know

rugged folio
#

its random number and recoloring something

karmic pilot
#

So say thanks for our assistance

rugged folio
#

thats incredibly simple man

knotty anchor
#

simple

#

easy

karmic pilot
#

Math.random is easy

tulip waveBOT
#

studio** You are now Level 4! **studio

rugged folio
#

yes

#

it is

knotty anchor
#

omfg

rugged folio
#

it could not be more confusing

knotty anchor
#

the best thing i can do

rugged folio
knotty anchor
#

is print

rugged folio
#

THEN LEARN MOREcrying

#

THEN make a game

knotty anchor
#

so i cant use this

karmic pilot
knotty anchor
#

just cuz

rugged folio
#

yea thats what im wondering

knotty anchor
rugged folio
#

did you just like

#

ask for every script you neede?

knotty anchor
#

typed them manually

#

and just

karmic pilot
#

Not learning

rugged folio
#

yea man you’ll never learn that way

karmic pilot
#

It’s copy pasting

knotty anchor
#

am i supposed to

karmic pilot
#

And then bro spams comments when it actually comes to learning

knotty anchor
#

just give up this thing im making

rugged folio
#

you’d be stuck like this forever if you keep doing it likes this

rugged folio
#

i made the same mistake

knotty anchor
#

no

rugged folio
#

and scrapped four different games

karmic pilot
rugged folio
#

each time because i made it horribly

knotty anchor
#

im not destroying 12 hours of building

rugged folio
#

IF you ever come to realise how to actually script

knotty anchor
#

omfg.

rugged folio
#

you’re gonna want to turn back by then

karmic pilot
#

I don’t

knotty anchor
#

and how am i supposed to learn when all learning classes are like

tulip waveBOT
#

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

karmic pilot
#

It just gets repetitive

knotty anchor
#

60 dollars.

rugged folio
#

okay how about this: take a break from working on this, make a baseplate, and learn there

#

not copying scripts

karmic pilot
knotty anchor
#

and its gonna take even longer

#

youtube tutorials piss me off.

karmic pilot
#

And is the best source for knowledge

karmic pilot
knotty anchor
#

cause if i have a question.

#

i have to

#

search ANOTHER video

#

watch it

karmic pilot
#

Just google

knotty anchor
#

and THEN go back

karmic pilot
#

Stick to one video

rugged folio
#

ok crazy idea but could you ChatGPT to learn how to script?

knotty anchor
#

but then.

karmic pilot
#

When you have a question, read the comments or google

rugged folio
#

it might work

knotty anchor
#

i will not understand

#

cuz what the person is explaining

#

has things

karmic pilot
#

Go to DevForum

knotty anchor
#

i dont know

karmic pilot
#

They explain the reason we live there

#

They are crazy

rugged folio
#

theres probably some kinda intro to scripting somewhere

#

quick google search

knotty anchor
#

so what learn for 8 months

#

to make one game whit 200 visits

#

max

rugged folio
#

you need to learn for like, two months until eventually you can teach yourself everything else

#

once you understand the core concepts and get the hang of it, all thats left to do is learn new things from the Documentation

karmic pilot
#

game.Players.PlayerAdded:Connect(function(player))
player.CharacterAdded:Connect(function(character)

local humanoid = character.Humanoid

local description = humanoid:GetAppliedDescription()

local function randomColor()
return Color3.fromRGB(
math.random(0, 255),
math.random(0, 255),
math.random(0, 255)
)
end

description.HeadColor = randomColor()
description.TorsoColor = randomColor()
description.LeftArmColor = randomColor()
description.RightArmColor = randomColor()
description.LeftLegColor = randomColor()
description.RightLegColor = randomColor()

humanoid:ApplyDescription(description)

Paste this code and ask if you don’t understand anything, but I believe it works

end)
end)

rugged folio
#

which will be easy to read by then

karmic pilot
rugged folio
#

easy

knotty anchor
#

thats too much

#

time.

rugged folio
#

its a rough estimate man

#

if you dont feel like doing that then scriping might not be for you

karmic pilot
#

And you’re crying over 2 months

rugged folio
#

you dont learn in three days and then make a game in a week

#

thats literally impossible

#

unless you make “STEAL A GARDEN BRAINROT” riddled with bugs, scripts made by other people, and robux products

#

which you wouldnt do, right?

knotty anchor
#

but if everyone lears by themselves

#

what would be the point

#

of this server

rugged folio
karmic pilot
rugged folio
#

theres a LOT of things on studio to learn

knotty anchor
#

: (

rugged folio
#

Tweens, metatables, this, that, animations, so on and so forth

knotty anchor
karmic pilot
#

Yeah then tell us what the error is

#

Open the output and let us know

knotty anchor
karmic pilot
#

Good

rugged folio
karmic pilot
#

Oh

knotty anchor
#

do i

karmic pilot
#

Remove that from the code

knotty anchor
#

delete every normal text

karmic pilot
#

If you didn’t already

rugged folio
#

also the first line has an extra parentesis

knotty anchor
#

do i just

#

copy the whole output

#

ok

karmic pilot
#

See

#

Cant help you

rugged folio
#

you can open a dev’s studio but you cant make him open a script

knotty anchor
#

i know i might sound

#

even dumber now but

#

is there a way to

#

turn roblox studio into

#

block coding

#

like

#

scratch and

#

stuff

#

like

rugged folio
#

no, but starting with scratch is a good way to learn

knotty anchor
#

a plugin

#

or

knotty anchor
rugged folio
#

actually there MIGHT be a plugin, idk

knotty anchor
#

but i doubt that by the standars they could be considered good

knotty anchor
#

ok

tulip waveBOT
#

studio** You are now Level 4! **studio

knotty anchor
#

oh

#

i think i fixed it

#

nice

#

is there

#

any like

#

playlists

#

i could

#

watch

#

that arent too long

karmic pilot
#

Why not watch the long ones?

knotty anchor
#

Are there playlists that arent long.

karmic pilot
#

Go look

knotty anchor
#

So there arent

karmic pilot
#

Never said that

snow sierra
#

337 messages?

odd stream
#

holy

tulip waveBOT
#

studio** You are now Level 12! **studio

odd stream
#

337 messages

knotty anchor
#

should i delete this now that its done

rugged folio
#

mark as completed

knotty anchor
#

ok

#

How do i