#code-discussion

1 messages · Page 48 of 1

vagrant shoal
#

Let’s learn to be self sufficient

somber vault
#

I'm not a visual learner

vagrant shoal
#

Luau is not hard to learn

#

Even then

silver verge
vagrant shoal
#

Read the Roblox API

hardy pilot
#

M

slender yew
#

Anyone know why I'm unable to use table values from module scripts?

slender yew
# silver verge show code

for _, food in pairs(foodAssets:GetChildren()) do
    if food:IsA("Tool") then
        table.insert(foods,{
            FoodType = food.Name,
        })
        
        return
    end
end

Module ^

#
local hungerhandler = game.ReplicatedStorage.Hunger.HungerModule
local foods = hungerhandler

tool.Activated:Connect(function()
    if tool.Name == hungerhandler.foods then
        print(hungerhandler.foods)
        
    end
end)``` 
script
silver verge
#

youre returning nil

#

remove the return and put return foods at the bottom of the module

slender yew
silver verge
slender yew
#

idk

#

Module code did not return exactly one value

silver verge
#

this returns nil

slender yew
#

yeah thanks

silver verge
#

remove it and return the foods table

#

at the very bottom after the loop

slender yew
#

oh the bottom of the loop not the module?

silver verge
#

no

#

return the foods table at the bottom of the module

#

and remove the return i circled

slender yew
#

yeah ight

hardy pilot
#

How do we feel about modules in instances tied to them

slender yew
#

whqt is this issue

#

like I know it doesnt return one value but I need access to all of the values returned

#

@silver verge

silver verge
#

your module isnt returning something

slender yew
#

ok

slender yew
#

instead of 1 and luau doesnt work with it

#

so it errors

silver verge
#

yeah dont do that

slender yew
#

yeah I didnt know

#

so I made the module table

#

now it works

#

ty

silver verge
#

ez

#

yw

ancient cove
#

yo

#

guys

short notch
#

how do you make mesh index

#

index{}
meshindex{}

ancient cove
#

i am really intrested to learn luau

#

can anyone tell me where to learn

tidal bolt
#

also you don't need pairs nor ipairs anymore

silver verge
tidal bolt
ancient cove
ancient cove
tidal bolt
ancient cove
#

thank u guys

small ingot
#

Since when can we data store tables without using JSON encode??

silver verge
#

forever?

small ingot
#

what the fuck

vagrant shoal
#

You can store tables but you can’t store stuff like color3

#

And vector3

silver verge
#

it's primitives only

vagrant shoal
#

In the tables

#

Yeah

ancient cove
silver verge
vagrant shoal
#

Although you can encode the color3s and vector3s in your own way

silver verge
#

mess around in studio

ancient cove
silver verge
#

before trying to watch videos

vagrant shoal
ancient cove
#

let me read it

vagrant shoal
#

Then docs will make even more sense

ancient cove
opal yarrow
#

can anyone tell me which is better to use task.spawn or coroutine.create or coroutine.wrap

#

they basically does the same thing i guess

short vale
#

for most basic usage task.spawn is fine

opal yarrow
#

ok thx

graceful nymph
#

youtube tutorials for the basics, documentation for anything after

good or bad

somber vault
#

Hello!
I'm trying to make a checkpoint system, currently each section has a spawn point that (should normally) not be able to be spawned on until the player has passed their first section. Making that their checkpoint. When the game loads the RespawnLocation is set (with replicatedfirst) to a spawnlocation called InitialSpawn. Yet for some reason sometimes it will still choose a random spawnpoint out of the sections. How would i go about fixing this?

graceful nymph
somber vault
graceful nymph
restive flint
graceful nymph
hardy pilot
vagrant shoal
somber vault
#

Error: Succes

opal yarrow
#

anyone can tell me which to use task functions or coroutines

vagrant shoal
pine chasm
#

Search up 'A-chassis'

lone rain
#

I needa set up the soccer camera system where when you score it pans the camera to your character

rugged mist
rugged mist
#

and the task library allows you to manipulate tasks

vagrant shoal
#

Wait no I did

#

He was asking whether to use task.spawn or coroutine

#

Pretty sure that’s what he meant

rugged mist
#

ah well coroutine.resume and task.spawn are essentially the same

vagrant shoal
#

Yeah

#

Idk I never use resume though I just use wrap straight away lol

rugged mist
#

well wrap creates a function not a thread

vagrant shoal
#

I know

#

I js hardly ever use it for that

rugged mist
#

cause wrap and create are similar not resume and wrap

#

resume and spawn are similar

vagrant shoal
#

Wait

#

Clarify

#

Spawn uses a function too

#

If I’m not mistaken

rugged mist
#

u said u don’t use resume u used wrap

vagrant shoal
#

I kind of grouped them to be the same things (spawn and wrap)

rugged mist
#

but those are completely different things

#

task.spawn can spawn threads and functions

vagrant shoal
#

I just said I never use resume

#

And I only ever use coroutine for functions

vagrant shoal
#

lol but did I say they’re the same

rugged mist
vagrant shoal
rugged mist
#

I don’t see the point of using coroutine wrap though

jolly harbor
#

is task.spawn more optimized than coroutine

rugged mist
#

why would you wrap a function in a coroutine vs just call it?

vagrant shoal
#

Other way around

rugged mist
#

task.spawn is a customized luau library

vagrant shoal
#

In the same script why else

jolly harbor
#

also i only use coroutine.wrap too lol

vagrant shoal
#

It’s just quick and convenient

rugged mist
#

but you can’t control the thread as much with yields and stuff can you?

vagrant shoal
#

No I can’t

#

I hardly ever need to

jolly harbor
vagrant shoal
#

It’s garbage collection that’s the problem

#

If I’m not mistaken

rugged mist
#

Roblox just created the task library as a simple means for devs

#

because it also allows for multi threading

#

task library is basically a wrapper for coroutines

#

in a slightly looser way

jolly harbor
#

i thought coroutines ran serially

#

and that actors only run parallel

vagrant shoal
#

Ask prime if you got questions he seems very knowledgeable about multi threading

rugged mist
#

coroutines run asynchronously

#

it’s not serial

vagrant shoal
#

Wait what’s the difference between coroutine and actors

rugged mist
#

it’s on the same thread as everything else

#

so basically

#

how roblox handles script execution is asynchronous for the most part

#

but serially through the script

#

if you create two seperate scripts they can run "at the same time"

#

but really they are running on the same thread asynchronously

vagrant shoal
#

Learn something new every day

rugged mist
#

its not really at the same time but the interpreter will try to switch between tasks during the clock cycle to make it seem like it is

#

now actors

vagrant shoal
rugged mist
#

allow you to use other cores

#

on the device

#

which allows you to truly use other threads

#

cause each core on a device usually has a thread

jolly harbor
rugged mist
#

which includes hyperthreading, because hyperthreading is basically just asynchronous threads

vagrant shoal
#

That makes sense

#

lol 5 years and Ian learn this

rugged mist
#

so basically this

#

imagine task1 is the red and the orange

#

and task 2 is the blue

#

synchronos would work one task at a time

#

asynchronous switches between the red-ish tasks and blue-ish tasks

vagrant shoal
#

Ohh

rugged mist
#

multithreading is actually two entirely seperate threads

#

which is what actors are for

vagrant shoal
#

So actors are multi threaded and coroutine is asynchronous

rugged mist
#

thats why people use actors for ai

#

because all that computational power

#

should be spread on other cores

#

rather than taking up all the bandwidth of the single thread

#

that lua runs on

jolly harbor
#

is there a reason why my coroutines randomly run on a different worker threads though

vagrant shoal
rugged mist
#

1.5 years

jolly harbor
#

all of them just switch to a random worker thread

rugged mist
#

it depends on where the task is handled

rugged mist
#

u can check my profile linked

vagrant shoal
# rugged mist 1.5 years

I started when I was 9 or 10 but didn’t really start getting active experience until 13 or so

#

Now I’m trying to fill all the gaps I missed

#

In my learning self taught

#

I js recently started commissions it’s going good so far

rugged mist
#

i started when i was 9 but i just did 3d modeling and building until 2 years ago

#

worked on alot of big games tho but building and modeling isnt where the money is at

#

trust

vagrant shoal
#

That’s cool

vagrant shoal
#

I was mid and the pay was bad

#

Never working for a percentage again

rugged mist
#

percentage is where its at bro

serene tulip
#

where to learn how to script

rugged mist
#

just gotta find the right people

vagrant shoal
#

Only if the player base is trusted

vagrant shoal
vagrant shoal
#

If you get confused you have the whole server here and videos on YouTube

serene tulip
vagrant shoal
#

Everything you need to know about studio

serene tulip
#

I was looking fo a dash system with vfx and the tuts werent rlly good

vagrant shoal
#

Also sorry Roblox uses Luau not lua

#

I don’t suggest you use specific tutorials like that

#

It will make you really dependent on others and not able to think for yourself and problem solve

#

It’s good to have a community and ask questions but don’t get into the habit of lacking self sufficiency

#

It will hurt you in the long run and hurt your growth as a scripter

rugged mist
#

If you want to learn lua i recommend starting with watching youtube tutorials like alvinblox, thedevking, bricey

#

and if you want to get really good read the lua manual

vagrant shoal
#

The dev king might be a little outdated but his lua tutorials are good

terse wigeon
serene tulip
#

yea cuz when I started modeling I would do any tut

vagrant shoal
serene tulip
#

any tutorial sme1 recommend

#

to learn luau

dense rock
#

DEAR CREATURES OF THE scripting realm REALM, THE BUILD REALM CALLS YOUR HELP, #⭐creations THE POOL IS CLEARLY BETTER THAN THE TAVERN AND THE NOOBISH BUILD! STAR IT

your country calls you.. skibidi

(don't star the others ezz)

rugged mist
#

what is that pool for

dense rock
white dock
#

any tips on how to get a top down picture of my city for mini map ?

serene tulip
#

is there a dif beetween lua and luau

dense rock
serene tulip
#

thats it?

rugged mist
#

lmaoo

#

luau is a versions of lua that was specifically made for Roblox

torn aurora
#

anyone wanna buy this I'm selling it for 1500 robux, I'll take payment in pls donate.

serene tulip
#

you cant dev ex robux from pls donate

torn aurora
#

wdym

#

?

#

@serene tulip

white dock
#

any tips on how to get a top down picture of my city for mini map ?

serene tulip
#

you cant dev ex robux earned in pls donate

torn aurora
#

@serene tulip I'm not taking the robux out for real money, I'm just gonna use it for games

jolly harbor
fossil salmon
serene tulip
#

and it didnt work for me as well when I first started

vagrant shoal
#

That makes sense

#

You have to get the robux from your creations

#

And I guess they can check where you got it from

fossil salmon
vagrant shoal
#

Yeah but they can check where the game pass was bought

serene tulip
vagrant shoal
#

If it was bought on pls donate then you can understand what happens

fossil salmon
#

it doesnt matter

serene tulip
#

it does

vagrant shoal
#

lol go read devex requirements on help page

fossil salmon
fossil salmon
vagrant shoal
#

Wait

#

If I earned my robux from a game pass that was bought from a game that I just used to collect robux will devex still work

ocean wharf
#

Could someone assist in scripting my RNG game, coins system, boost system etc

serene tulip
vagrant shoal
#

so it doesnt matter if its a template experience with no user visits

#

just as described

#

because thats all the game exists for

#

to collect robux from commissions

serene tulip
vagrant shoal
#

alr

#

wait i dont think it is bro 💔 🥀

#

its a recent update to the terms of use

#

its over bro 💔 🥀

static coral
vagrant shoal
#

that wont fix my devex with the robux i already earned

static coral
#

then make a shirt/pants, send the robux off to a different account and buy the clothing from that account

#

i think that would be the only way

static coral
#

how many visits do u actually need

#

maybe just publish junk game and let a few people play it

topaz crypt
#

I made a character selection script and its working fine but when the character dies they dont respawn is this a common problem?

vagrant shoal
#

or wait

#

i could turn my devex gamepass game into my demo for my application for the luau programmer role

static coral
vagrant shoal
#

and put it on my portfolio

vagrant shoal
#

a game?

static coral
#

yes

vagrant shoal
#

bet

#

im gettin to work rn

static coral
#

search rate my avatar 2

#

then go acquire your “paid workers”

#

just make a booth

#

with some yap about how you are an upcoming passionate developer

vagrant shoal
#

thanks for the strat bro you a real one

static coral
#

minecraft villager strats bro

static coral
cinder trellis
#

If anyone have made advanced combat systems before, how did yall manage to prevent combat clashing between two parties?

steep pebble
#

why does making the height 100% make the div box dissappear

stuck radish
karmic coral
#

jk i just waffeled LOL

stuck radish
#

show html structure & rest of css

#

or make a codepen

steep pebble
fading hull
#

any scripter wanna work n an rpg, you will be working along side another scripter

steep pebble
stuck radish
#

try puting content in it

#

you're saying height = 100% but that means 100% of the available height

#

and there is no available height due to your parent (body)

#

also avoid spamming ids like that, prefer classes

steep pebble
stuck radish
#

make the body taller

#

set it to 100vh

steep pebble
stuck radish
#

yes that's what 100vh does

#

the entire viewport height

steep pebble
#

with out extending the page

stuck radish
#

if you put it on the body, it won't do that

steep pebble
#

aside from that how do i put elemets behind each other or in front?

stuck radish
#

flexbox

#

or make the elements inline & set their width (ugly way)

steep pebble
# stuck radish flexbox

would it work like lets say moving someone infront of a line or bejind a line not side to side?

stuck radish
#

I think it's best if you try to learn the basics

steep pebble
#

cause i only learnt it as in order number go in like 1 2 3 4, then using flex to reverse it or change value locations

stuck radish
stuck radish
#

reading is not the same as learning

#

cause if you learned, the previous questions you asked should be self explanatory, no offense

steep pebble
#

i gues she missed that part

stuck radish
#

watching & reading is not the same as learning

stuck radish
#

you need to actively participate

#

code along

steep pebble
#

i wrote notes

steep pebble
#

to look back at if i mess up but i cant find anything about priority

#

layering

#

idk what it is called so ill just name it priority layering

stuck radish
#

you mean something like z-index or the order property of a flex child?

steep pebble
#

yh

#

how to change the z positioning of elements

stuck radish
#

element {
z-index: whatever
}

umbral carbon
stuck radish
#

that property exists yes

umbral carbon
#

Nice

#

Well, I don't work with CSS much, I mostly use Bootstrap

#

Though not to demotivate you @steep pebble

remote nexus
#

How to make tycoon buttons

steep pebble
stuck radish
#

wym

umbral carbon
stuck radish
#

position: absolute and setting top, bottom, left, right?

steep pebble
#

yh

remote nexus
umbral carbon
steep pebble
steep pebble
remote nexus
umbral carbon
stuck radish
#
  1. Beginner Course: Roblox Scripting for Beginners (approximately 5 hours)
  2. Advanced Course: Roblox Advanced Scripting (approximately 15 hours)

This is the first episode and beginning to become a Roblox Scripter/Game Developer! With 3 playlists (Beginner, Advanced, GUI) containing 50+ videos and 30+ hours of content, I will guide you through this journey to start making the games you want to create on Roblox!

DISCORD 📜
Join my Discord Community if you want scripting help, participat...

▶ Play video

PATREON🎁
Get Access to My Scripts + More Perks by Becoming a Patreon Member!
https://www.patreon.com/BrawlDev

DISCORD 📜
Join my Discord Community if you want scripting help, participate in events/challenges, and make friends!
https://discord.gg/WC6kPu5W5P

ADVANCED ROBLOX SCRIPTING SERIES 🔴
https://www.youtube.com/playlist?list=PLQ1Qd...

▶ Play video
steep pebble
stuck radish
steep pebble
#

thx

#

lemme add z- index to my notes

somber vault
#

I have 3 years experiences in script in roblox and wanted to ask if it's possible for me to remake the game grow a garden easy?

umbral carbon
#

I don't know

#

Try it out

somber vault
#

I mean it doesn't seems complex first seen

#

but the fruits growing up when you're offline might be quite hard

spring token
somber vault
#

I'm pretty sure it's a table with all the fruit and maybe it calculate how much time have you been off and it calculate a factor that tell you how much the fruit have grown

spring token
#

it's a pretty simple concept i'm surprised no one has thought of it until now

ruby cipher
#

i just wanted you to know that

#

im here for you

spring token
#

oh word

ruby cipher
#

if you're ever struggling emotionally or financially, just give me a call

spring token
#

send me $90 im tryna get a switch game

ruby cipher
#

90 for a switch game bakedasf

#

how outrageous

#

this isn't good for your mental health the most humble programmer alive

spring token
#

some even say too humble

ruby cipher
#

sure you are, but do you really think that you will stay this way if you keep doing activities like such?

#

you need to stop gooning to zenless zone zero and most important of all, please stop gambling on genchin impact

spring token
#

you're right minglemer i need to reassess my priorities and get my life together!

ruby cipher
#

that's the spirit!

somber vault
#

btw I have plan to make grown a graden with chickens

#

( eggs )

ruby cipher
#

fr?

#

how much do chickens cost nowadays

#

alive

hasty mesa
#

There's a chicken farm near me

#

And we got chickens from there before

ruby cipher
#

well not in america

#

but here in europe they are

hasty mesa
ruby cipher
hasty mesa
ruby cipher
#

I would have never thought of something like that lmfao

coarse notch
#

how do i actually make progress learning, i watched tutorials but now what

cinder zinc
#

Is there a property all moving objects have that can get velocity?

coarse notch
#

someone write me a code that will teach me chemistry 💔

coarse notch
midnight cradle
#

Question
Is there a script I could use that lets me put a function and be able to use that function in a different script?

#

Or is that already included with the studio

midnight cradle
#

Ok

jolly harbor
#

just define the function then return FunctionName at the end for your ModuleScript

#

then when you type Func = require(ModuleScript) it lets you reuse the function you created

regal tree
#

crap, i'm having difficulties with a script

  • the script is inside a UI, this UI has buttons to allow a player to change teams

  • when a player presses "Play" after selecting their team, they are meant to be respawned so that they spawn at their spawnpart

right now all it does is respawn the player, i'm assuming the problem is that the game has streamingenabled toggled on

i've tried making the spawnparts persistent by putting them inside a model, no game

also tried putting the spawns inside replicatedstorage, same deal

any tips? sorry for the text wall guys

trim dove
regal tree
#

and the spawn parts are quite far from where the player initially spawns at, the map is 10k by 10k studs

bleak glade
#

is this messy or easy to follow

paper dawn
#

its structed good

bleak glade
#

ty, i was tihnking about releasing it as part of my framework

#

or just using it to my self, im not sure

paper dawn
#

is this something for client server communication?

bleak glade
paper dawn
#

nice

bleak glade
#

it allows for disconnect/ reconnect for a certain id

#

so you can disconnect it when you want

dark karma
bleak glade
dark karma
bleak glade
#

luau

#

technically

dark karma
#

this looks so difficult

bleak glade
cinder crater
#

I'm currently trying to create dev prducts that if you buy sth gets e.g. +1000 poitns but no matter what I try it doesn't work, can anyone help me?

dark karma
bleak glade
#

you dont have to code that at all

#

its part of a framework im working on

dark karma
#

no games requires this type of code ?

bleak glade
#

theoretically no

dark karma
#

alr

#

oh its framework

bleak glade
#

but using a framework makes it easier and organized

dark karma
#

so yeah thats why

#

alr alr thank you

#

yoda can i ask you an advice ?

#

i just learnt basic lua, more or less advanced level what can i do now to get hired ? @bleak glade

dark karma
bleak glade
#

you can start there

dark karma
#

ok

#

and then

#

should i do free services ?

#

or make everyone pay

bleak glade
#

i didnt do that

dark karma
#

alr

#

you got hired fast tho ?

bleak glade
#

you can make small things or what not in studio

bleak glade
dark karma
#

hm

#

so just a portfolio

bleak glade
#

my first job i didnt get paid much but the opportunity cost was so high, based on what i learned

dark karma
bleak glade
#

yeah it was an rng game

#

but it helped me learn module organization

dark karma
#

and whats best way to progress now, since i know pretty much all that needs to be knowns for basic games

dark karma
bleak glade
#

keep challenging yourself

dark karma
#

got it man, thanks !

bleak glade
#

np

round tartan
#

Yo

zealous narwhal
#

is creating a portfolio in a discord server a good idea since I see a lot of people do it

midnight cradle
#

I got a code to work

#

It’s a pain

somber vault
#

Im fr trying to hire a lua scripter but aint nobody takin my money. I need help bru

zealous narwhal
midnight cradle
#

All it does is spawn a part that can also spawn parts

#

Because I’m trying to do generation

zealous narwhal
#

that’s cool for like a cloning ability

somber vault
#

It's a long term project for a game in the makes......

#

Not just helpp

ruby cipher
umbral carbon
fading hull
#

any scripter wanna help and make an rpg u will be working along side another scripter

solid fulcrum
#

error after error i just cant figure out how to change a blocks color then make it go away after like a few seconds

#

after you step on it

#

wait mb i placed the ) wrong

rose lotus
fast wedge
#

his bracket at the wrong place

solid fulcrum
#

fixed it but the block still wont change color

rose lotus
solid fulcrum
rose lotus
fast wedge
rose lotus
solid fulcrum
#

then change bafck to normal after a few seconds

fast wedge
#

oh

mint cloud
solid fulcrum
mint cloud
#

Where did u put it

solid fulcrum
#

that should be colored once stepped on it

mint cloud
#

Ok, is the print happening?

solid fulcrum
#

yes

mint cloud
#

Put the code from the second if statement in the first

#

And parentheses around really red

fast wedge
#

local Time = 5
local Part = game.Workspace.touchPart
Part.Touched:Connect(function(P)
if P:IsA("BasePart") then
local InitColor = P.BrickColor
P.BrickColor = BrickColor.new"Really Red"
task.delay(Time,function()
P.BrickColor = InitColor
end)
end
end)

#

idk if i did properly

#

im on phone

#

i did some caps error and stuff oop

solid fulcrum
# mint cloud And parentheses around really red

local touchPart = game.Workspace.touchPart

local partIsTouched = false

touchPart.Touched:Connect(function(otherpart)
if partIsTouched == false then
partIsTouched = true
touchPart.BrickColor = BrickColor.new("Really Red")
task.wait(1)

    if partIsTouched == false then
        partIsTouched = true
        print(otherpart.Name)

        task.wait(1)
        partIsTouched = false
    end
end

end)

#

still doesnt work

mint cloud
#

You should only have one if statement

solid fulcrum
fast wedge
#

try my version reef

#

edit the time for the delay before it turns back

#

tho

mint cloud
#

It looks right, put the partIsTouched == true at the end or maybe ur using brick color wrong

#

Convocator probably knows better

olive ingot
#

I love coding, but I hate when my code doesn't work (whihc is 90% of the time)

fast wedge
solid fulcrum
#

doesnt work..

olive ingot
#

I'll spend 20 minutes coding, thinking im so smart and i've finally found a fix.. just for it to be the exact same as before

fast wedge
#

wait so

#

oh

#

wait

#

reef

#

u want it to make ur entite character red?

#

entire*

#

or

#

show me ur explorer rq

fading hull
#

any scripter wanna help and make an rpg u will be working along side another scripter

olive ingot
olive ingot
bleak topaz
#

uhh

bleak topaz
#

its not gonna go pass the if statement

#

because partisTouched is always gonna be true in that case

#

i dont think creating a brick that changes color and turns back can be that convoluted imo

lament hazel
#

guys chatgpt better than yall

abstract flare
#

Yo does anybody know why my robux eggs in my simulator game works inside roblox studio but when u buy it in the actual game the player doesnt get the pet

#

I'm kinda new to scripting so finding any error is quite hard

rugged mist
#

send code

ancient eagle
#

Can someone explain to me why I cant get the clickDetector.MouseHoverEnter to actually work, like I've tried to like 30 minutes now...

#

I might just be stupid

fast wedge
ancient eagle
#

Oh

#

Makes a lot of sense then

#

Lemme try that

fast wedge
#

and uh

#

wait

#

click detector?

#

what are u tryna do

ancient eagle
#

Basically Im trying to make it so that when I hover over a part, the part will get a slight highlight and rotate to the player, but I cant seem to get the mouse hover thing to work at all

fast wedge
#

Hm.

#

from close?

ancient eagle
#

Yea the camera will be locked into a position close to it

#

I just made like a super simple thing to try to get the mouse hover part to work:

local part = script.Parent
local detector = script.Parent.ClickDetector

detector.MouseEnter:Connect(function(player)
    part.Highlight.Enabled = true
end)
#

Even that doesnt work

fast wedge
#

ik

#

mouseenter is for gui

#

i didnt understand at first

ancient eagle
#

Oh

#

That makes sense then

fast wedge
#

the part already had a highlight?

ancient eagle
#

Yea

#

Its just disabled, so I can just check if the hover part works

fast wedge
#

and the click detector too?

ancient eagle
#

Yup

fast wedge
#

hm..

remote bear
odd nacelle
#

Anyone need any scripting help im a 6 year scripter?

fast wedge
ancient eagle
#

That works, problem is I need the function to be local

odd nacelle
ancient eagle
#

Not server sided

#

Basically Im trying to make it so that when I hover over a part, the part will get a slight highlight and rotate to the player, but I cant seem to get the mouse hover thing to work at all

odd nacelle
#

ray casting

fast wedge
#

problem with ray casting is hed have to use a loop that raycast his mouse

#

mouse.hit

#

or wtv

#

well thats the only way i see

odd nacelle
#

yeah but i mean its probs best to use and most effiecient

ancient eagle
#

Anyone know a good tutorial or documentation on using raycasting for mouse positions then? xd

fast wedge
#

oh wait there might actually be a better way

ancient eagle
#

Yea?

fast wedge
#

With uh

#

mouse.Move

#

u make a connection with it and check the mouse and if its on that part that u want to highlight

#

then it does

cosmic olive
#

That won't necessarily work since the camera can move if the character moves

fast wedge
#

i dont get what youre trying to say here

ancient eagle
#

The camera will be locked

#

So that isnt a issue

fast wedge
#

Idk if it still classify camera shift lock movement

#

as a mouse movement

#

if thats wym

cosmic olive
#

Even if it is locked, the camera moves when the character moves, the mouse can move off of an object without moving the mouse specifically

fast wedge
#

thats fine

ancient eagle
#

But doesnt that just mean that if I lock the character, that wont be a problem?

cosmic olive
#

If you lock the character it won't be an issue yea

#

Or you can update it when the camera moves and when the mosue moves

fast wedge
#

ye

ancient eagle
#

Does this not work in LocalScripts or am I tweaking

cosmic olive
#

It would only work in local scripts, you can't really know where the mouse of someone is server-side

odd nacelle
#

ray casting is 10X easier

cosmic olive
#

You should use raycast as opposed to mouse.hit, but it doesn't really solve the issue of when to raycast (or mouse.hit)

#

Although, ignoring mobile, mouse.hit is totally easier than raycasting for general purposes lol

ancient eagle
#

I mean, the part will only be accessible at certain times, like when a player goes to a specific shop or whatever, they will be taken to a table where the part will be, and ONLY then will they be able to access it

#

So the "when to raycast" part wont neccessarily be that big of a problem

cosmic olive
#

Yea, I was just pointing out that raycast doesn't solve that particular issue

ancient eagle
#

Ah

odd nacelle
#

im 6 year scripter making a roblox game anyone interested in helping scripted basic its a parkour level game need more help though

pulsar wasp
#

are coroutines only useful if there are multiple loops in a script?

halcyon fulcrum
#

GuiButton.Text = "On"

GuiButton.MouseButton1Click:Connect(function()
    if GuiButton.Text == "On" then
        GuiButton.Text = "Off"
        
        script.Parent.Parent.HUD.Canvas.Currency.Visible = false
    else
        GuiButton.Text = "On"
        script.Parent.Parent.HUD.Canvas.Currency.Visible = true
    end
end)```
i want it to when pressed and switched to off that the color changes too how to do it?
proud garden
#

I think its like GuiButton.Color3 = Color3.New(1,0,0) or something like that.

halcyon fulcrum
proud garden
#

Let me see if I can do it,

halcyon fulcrum
#

ty

#

but if u got something tell me maybe ur way is better

cosmic olive
#

useful* whoops lol

proud garden
#

i got it to work for me both ways,

halcyon fulcrum
cosmic olive
proud garden
halcyon fulcrum
#

i tried BackgroundColor and BackgroundColor3

cosmic olive
#

Can you post your code?

proud garden
brittle dew
#

What's the difference between ProductID and assetID

proud garden
halcyon fulcrum
# proud garden What did you do inside the code?

GuiButton.Text = "On"

GuiButton.MouseButton1Click:Connect(function()
    if GuiButton.Text == "On" then
        GuiButton.Text = "Off"
        GuiButton.BackgroundColor3 = Color3.new(255,80,80)
        
        script.Parent.Parent.HUD.Canvas.Currency.Visible = false
    else
        GuiButton.Text = "On"
        GuiButton.BackgroundColor3 = Color3.new(55, 255, 0)
        script.Parent.Parent.HUD.Canvas.Currency.Visible = true
    end
end)
brittle dew
#

sorry is this question is stupid

cosmic olive
halcyon fulcrum
brittle dew
#

but what's the difference between PromptProductPurchase and PromptPurchase

cosmic olive
#

Is the code similar to:

GuiButton.BackgroundColor3 = Color3.fromRGB(255, 80, 80)

?

cosmic olive
#

Can you post your updated code? It might just be the wrong color values, but I'd like to make sure

halcyon fulcrum
cosmic olive
#

The second one is still Color3.new(55, 255, 0) instead of Color3.fromRGB(55, 255, 0), changing that should fix it

halcyon fulcrum
# cosmic olive The second one is still `Color3.new(55, 255, 0)` instead of `Color3.fromRGB(55, ...
local GuiButton = script.Parent.Settings.Frame.GuiButton

GuiButton.Text = "On"

GuiButton.MouseButton1Click:Connect(function()
    if GuiButton.Text == "On" then
        GuiButton.Text = "Off"
        GuiButton.BackgroundColor3 = Color3.fromRGB(255, 55, 0)
        script.Parent.Parent.HUD.Canvas.Currency.Visible = false
    else
        GuiButton.Text = "On"
        GuiButton.BackgroundColor3 = Color3.new(55, 255, 0)
        script.Parent.Parent.HUD.Canvas.Currency.Visible = true
    end
end)```
#

like this?

cosmic olive
#

Look at the one after the else statement, see how your using Color3.new instead of Color3.fromRGB?

halcyon fulcrum
#

oh yeah

#

nah didnt solve anything

#

nothing can fix this script

#

i aint dying before i fix it

cosmic olive
#

Lol don't crash out I'm sure it's a simple fix, to clarify, both are using Color3.fromRGB?

halcyon fulcrum
#

GuiButton.Text = "On"

GuiButton.MouseButton1Click:Connect(function()
    if GuiButton.Text == "On" then
        GuiButton.Text = "Off"
        GuiButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
        script.Parent.Parent.HUD.Canvas.Currency.Visible = false
    else
        GuiButton.Text = "On"
        GuiButton.BackgroundColor3 = Color3.fromRGB(55, 255, 0)
        script.Parent.Parent.HUD.Canvas.Currency.Visible = true
    end
end)
#

like the thing is

#

wait lemme rec

cosmic olive
#

Then it should work, assuming you're changing the color of the right thing.

cosmic olive
#

Hm

#

Where's the script located?

#

And where is the UI located?

halcyon fulcrum
halcyon fulcrum
coral field
#

Would play the video but my internet is refusing to load it

golden crag
#

We've all had the script that doesnt work properly without throwing errors
But what about when the script throws an error and still works anyways

halcyon fulcrum
halcyon fulcrum
coral field
#

Its not even discord as my internet has been randomly turning off

novel cloak
cosmic olive
#

This may sound stupid but maybe just save the place, then restart studio?

golden crag
cosmic olive
#

Assuming you're referring to everything properly, and another script isn't overwriting it, I think it should work assuming the code you've shown is what you're using

cosmic olive
novel cloak
cosmic olive
#

There might be one you've forgotten about or something affecting the color

novel cloak
#

if there’s an error in syntax or something isn’t properly defined and whatnot studio will tell you where the error is

coral field
cosmic olive
#

That could work too, colors can be finicky for some reason

halcyon fulcrum
#

Same problem

halcyon fulcrum
#

All are dark

coral field
#

What are the properties of the button

#

That could change colour

novel cloak
halcyon fulcrum
#

I have a theory wait

cosmic olive
#

Something else must be overwriting it maybe? Try putting this in a script to see how it changes color

local button = (button location goes here)

button.Changed:Connect(function(prop : string)
  if prop == 'BackgroundColor3' then
    print(button.BackgroundColor3)
  end
end)
halcyon fulcrum
#

Nah

#

Nah

#

I fixed it

cosmic olive
#

Oh neat, do you know what the issue was?

halcyon fulcrum
cosmic olive
#

LMAO

#

Yea been there

halcyon fulcrum
#

Nah

#

I can’t tolerate dis

#

I was close to be laying down with my ancestors

#

Or doing schedule 1 irl and quitting scripting

golden crag
cosmic olive
golden crag
#

Thats the thing, it works anyway

cosmic olive
#

I mean yea but you should probably want to get rid of the warning

golden crag
#

Fascinating little creature this engine is

halcyon fulcrum
#

thank you @cosmic olive

cosmic olive
#

Could also do:

Animation.Ended:Connect(function() SoundEffect:Play() end)

if that doesn't work :P

halcyon fulcrum
#

U wasted ur time cuz of my lack of attention

cosmic olive
golden crag
#

Will attempt

halcyon fulcrum
halcyon fulcrum
golden crag
#

Which, doesnt work for my specific case since for some reason the function yields until I release the mouse button, as the rest of this code block repeats on a loop until the mouse is release, so a strange interaction there

cosmic olive
#

x. x

vagrant shoal
#

What is the best way to script the destructive effects of an anti material bullet

vagrant shoal
vagrant shoal
vagrant shoal
cosmic olive
#

You'd probably need to design a map with it in mind, or dynamically make a function to split up parts that it hits and change the anchor property of them

vagrant shoal
#

Is using explosions efficient

golden crag
cosmic olive
#

Former is kinda annoying but easier to think about, latter is much harder to make but is easier to work with (you don't need to really think about it)

cosmic olive
vagrant shoal
golden crag
#

Explosions have a lot of wierd interactions with anchored vs non-anchored parts,

cosmic olive
#

Can definitely work though if you're building a classic style game or don't really care about the effect that much

#

A custom thing will pretty much always be better though lol

vagrant shoal
#

I like putting effort lol I don’t like making cash grabs it’s no fun

cosmic olive
#

I've spent the past like 4 days making a door for my game lmao

golden crag
#

That's that grind

cosmic olive
#

It just has like 50 properties I have to deal with and it's really modular

#

Better to get the logic out of the way now then deal with it later

vagrant shoal
#

These are the entities I will be testing the antimateriel on

#

I scripted them to have green cores / weak points where they can die if the core integrity becomes critical

cosmic olive
#

Those skeletons are sick, that's really cool

valid bay
#

Can someone help me understand what i'm doing wrong, the part does not move.
this is the full script:

local part = game.Workspace:WaitForChild("Part")
local dragDetector = part:WaitForChild("DragDetector")

dragDetector.DragStyle = Enum.DragDetectorDragStyle.Scriptable
local lastViewCFrame = CFrame.new()


dragDetector.DragContinue:Connect(function(player: Player, cursorRay: Ray, viewFrame: CFrame)
    lastViewCFrame = viewFrame
end)

dragDetector:SetDragStyleFunction(function ()
    local frontPosition = lastViewCFrame.Position + (lastViewCFrame.LookVector * 10)
    return CFrame.new(frontPosition, frontPosition + lastViewCFrame.LookVector)
end)

... but if i put

local frontPosition = lastViewCFrame.Position + (lastViewCFrame.LookVector * 10)
part.CFrame =  CFrame.new(frontPosition, frontPosition + lastViewCFrame.LookVector)

Inside the dragDetector.DragContinue the part moves.

vagrant shoal
vagrant shoal
#

Does that make sense to you?

valid bay
#

oh yes it does

#

i thought i just had to return the CFrame and it would do the rest

cosmic olive
valid bay
#

see

vagrant shoal
#

That’s odd

cosmic olive
#

Make sure DragStyle is set to scriptable

valid bay
#

yes it is

cosmic olive
#

Hm

vagrant shoal
#

Wait I think I know what’s going on

#

Your function here

#

dragDetector:SetDragStyleFunction(function ()
local frontPosition = lastViewCFrame.Position + (lastViewCFrame.LookVector * 10)
return CFrame.new(frontPosition, frontPosition + lastViewCFrame.LookVector)
end)

#

It’s using stale data from lastViewCFrame, which only updates during DragContinue. But SetDragStyleFunctio runs before DragContinue fires—so lastViewCFrame is outdated and maybe even CFrame.new() (the default) when drag starts.

valid bay
#

🤔

vagrant shoal
#

You need to use the parameters passed into SetDragStyleFunction, like this

dragDetector:SetDragStyleFunction(function(player, cursorRay, viewFrame)
local frontPosition = viewFrame.Position + (viewFrame.LookVector * 10)
return CFrame.new(frontPosition, frontPosition + viewFrame.LookVector)
end)

#

Now it uses fresh data every frame

#

I may be wrong

valid bay
#

nah you're onto something

cosmic olive
#

I think you probably should use the passed values, but I think with the pre-existing code it should've done something, right..?

vagrant shoal
#

Yeah

#

That’s what doesn’t make sense

thorny hatch
#

YO keyframes keyrames bezier curves ahahahahahaaa.

cosmic olive
#

Tbh the position being updated like that is kinda weird

valid bay
#

he is right SetDragStyleFunction is being called first

vagrant shoal
#

Does it work

#

Or partially work

valid bay
#

no the pre-existing code doesn't work the part doesn't move at all

#

i'll try to understand how i can use the cursorRay which is passed into the DragStyle function to move the part instead

cosmic olive
#

Yea good luck, seems kinda weird to set up lol

mild badge
#

why does my pathfinding ai stops working properly after a few mins?

vagrant shoal
#

We need more info than that

valid bay
#

I don't understand this....
part.CFrame = ... WORKS! the part is following my cursor just like i want it to but if i remove it the part doesn't move at all

dragDetector:SetDragStyleFunction(function (cursorRay)
    local finalPosition = cursorRay.Origin + cursorRay.Direction.Unit * 8
--    part.CFrame = CFrame.new(finalPosition)
    return CFrame.new(finalPosition)
end)
#

that's not supposed to be the case

#

and i can't just leave part.CFrame = ... because then the part just says in the position it was left

#

this is what happens

tranquil spire
#

dm me if you're a high quality scripter looking for a building partner tryna launch a game studio (I have 4 years experience, contributed to 10m visits, ~2m of my own).. I have robux to invest if worth

somber vault
#

Who’s a good scripter

lime iron
#

slapped together a time module

#

whjat features should i add to it

cosmic olive
median tiger
vagrant shoal
#

Is it better to use HumanoidRootPart:ApplyImpulse()?

cosmic olive
#

I would stick to some sort of force instance

vagrant shoal
#

Alright

cosmic olive
#

Although it's not super difficult to just tween the body back a bit, it might interfere with the movement scripts so I'd avoid that unless you don't want them to move while being knocked back

#

Honestly there's a bunch of ways to do it

#

Kinda just depends on how you want it to 'feel'

cold stone
#

alr i need help icl

#

how tf do i check if the textbuttons name is == a dicionary in Codes

cosmic olive
#

Hi, you can do

for _, code in ipairs(BackgroundFrameGetChildren()) do
  if Codes[code] ~= nil then
    -- stuff
  end
end
#

You should use 'ipairs

cold stone
#

why i pairs?

#

cs it index it

#

right

#

like 1,2,3 etc

cosmic olive
#

Sorry, ipairs is best used when it's not a dictionary, it's more optimal

cold stone
#

oh

cosmic olive
#

And getchildren() returns a table, so it's indexed in order

cold stone
#

yeah

#

okay

cosmic olive
#

It's not super important, a very minor distinction

cold stone
#

okay

#

doesnt print

cosmic olive
#

Sorry, totally forgot, you need to do v.Name lol

cold stone
#

i hate tables and diconarys sometimes

#

oh

#

doesnt work

#

dictionarys

cosmic olive
#

Are you sure the function is running?

cold stone
#

yes

#

the gui pops up

cosmic olive
#

Just to clarify, you're code is:

if Codes[v.Name] then
  print(Codes[v.Name])
end

Right?

cold stone
#

yes

#

ohh

cosmic olive
#

I'm assuming there's stuff inside of the frame named properly?

cold stone
#

wait nvm

#

mb

cosmic olive
#

Lol no worries

cold stone
#

it worked now i forgot v.names in the top

cosmic olive
#

Ah

#

Yea most coding issues tend to be silly little things like that :P)

cold stone
#

yep

#

are u ai or sum

#

lmao

cosmic olive
#

I promise I'm not lol

cold stone
#

alr lmfao

cosmic olive
#

Kinda hurtful 😢

cold stone
#

take it as a compliment

#

you type proper grammar unlike others including myself

cosmic olive
#

Lol just a habit, I like how it looks ;P

cold stone
#

made the text with code lmao

#

forgot to spell nine properly

cosmic olive
#

Mood tbh

cold stone
#

there

cosmic olive
#

Oh nice, I like how that looks :D

cold stone
#

yea me too icl

#

turned out better than i though

old mango
#

Getting weird problem where my return value(A dictionary) turns into a string along the way.

#

Got no idea how this is happening 😭

cosmic olive
#

I think it might be related to the return value of:

result, Data = pcall(module.playerStore.SetAsync, module.playerStore, PlayerWrap.Owner.UserId, Data)

Not 100% sure since I've no idea what those do, but it's possible that's setting Data to be a string (Looks like the user id, maybe?) instead of the data

old mango
#

Thats what I initially thought to but after placing a couple breakpoints and looking at the watch the pcalls seem to return just fine

cosmic olive
#

I'm assuming the :ConnectPlayer() method is shown in the first image?

old mango
#

yes sorry it was a bad screenshot

cosmic olive
#

Lol no worries, are you sending the tables over a remote event or the like? Those have weird behaviors with dictionaries, if I remember correctly

old mango
#

Nope I am just using requiring a module script(called datastore) and using its ConnectPlayer function

#

both are serverside

cosmic olive
#

Oh boy

vagrant shoal
#

How would I make a scope HUD for a sniper rifle that zooms in on the 2d area of the scope but is normal outside that area?

cosmic olive
#

Are there any other returns for that function or is just the one?

vagrant shoal
cosmic olive
vagrant shoal
cold stone
old mango
cold stone
#

but u can use z index

vagrant shoal
#

I thought about capture service but that wouldn’t work either

cold stone
#

and js make abunch of frames around it to get that scope effect

vagrant shoal
#

I know

cosmic olive
vagrant shoal
#

But I wanted something more realistic

#

If only you could use capture service with cframes 💔🥀

cold stone
#

it would be realistic or as realistic as roblox uis could get

old mango
cosmic olive
old mango
#

Yep its came outta nowhere steamsad

raven marsh
#

a

old mango
cosmic olive
#

Ah, yea, glad you were able to figure it out :D

west copper
#

Is it bad I use ChatGPT to fix 99% of my codes and of course just to make them

cosmic olive
west copper
delicate glacier
west copper
cosmic olive
delicate glacier
#

Multiple languages also

delicate glacier
west copper
delicate glacier
#

Like I do sfx and music

west copper
#

So of course, I have to become full stack

delicate glacier
west copper
cosmic olive
delicate glacier
#

Bro I'm to tired

cosmic olive
#

Stroke moment

delicate glacier
#

You get what I mean

cosmic olive
#

If you mean scripting, then yea lol, I've been scripting for around 10 years or so

delicate glacier
#

Ah ok

cosmic olive
#

Only got good the past like, 2-3 though :P

delicate glacier
#

xD

west copper
#

Being a builder is like Legos, but understanding code is pretty damn foreign to me

(since I’m good at making my own LEGO builds without instructions of course Roblox was easy as 123)

Maybe there’s some software that can make it like LEGO build For the coding

delicate glacier
#

I'm know how to code basic things, but it's not what I focus on

delicate glacier
west copper
delicate glacier
west copper
delicate glacier
#

Due to the fact I'm a sfx guy and we have 2 animators, 3 scripters and 1 ui

delicate glacier
#

Bru can I change my roles

west copper
delicate glacier
#

Shsheheuj

#

Hm would you do it for if ya were interested?

delicate glacier
#

How much would you do

west copper
delicate glacier
#

How much would I have to pay you to make a map

west copper
#

I’m not the best at pricing

delicate glacier
#

Dm

raven marsh
#

a

delicate glacier
#

B

tiny schooner
#

Anyone good with blender and rigs in here? I have been through a couple different experts and cant seem to get my models importing into roblox correctly. Would be happy to compensate for your time if you can point me in the right direction. Thanks.

worn pilot
#

whats the error look like or what does it look like when u actually import it

spark geode
#

i want to move a brick object around a sphere, but i also want it to be warped to surface of the sphere, how would i do this?

iron oyster
#

math would be preferable

spark geode
zenith mason
#

if u mean something like cloth simulation when you say "warped to the surface" then i can only think of custom mesh. i personally havent dealt with such things

bleak nexus
#

yo bruh @soft marsh whar up

topaz crypt
#

Someone please tell me how i have statemanager module and i handle all state checks and sets on the server for all scrips however somehow all my moves are breaking into eachother and destroying the game if i can fix this one thing i can progress

waxen needle
#

instead of writing comments like this

//Comment

you had to write your comments like this

using Comments;

public static comment Reasoning()
{
  return /*This if statement is damn useless*/;
}

Comments.UseComment(Reasoning);
if (true)
{

}
#

opinion?

placid agate
waxen needle
placid agate
#

no i must have missed it

lilac crescent
#

@pine solstice so like I made something, dms

iron skiff
#

anyone know how to script a free ugc system

#

like for the free ugc obbies

neat mauve
vague steppe
#

y'all is it ok if i give a scripter 30%?

neat mauve
#

95% at least

vague steppe
#

...

#

the scripting is simple dawg.

#

it will only take a god scripter about 1 hour to complete task]

#

and they get 30%

teal marsh
#

hey evering one

#

i need help in a code that is a bit scuffed

#

if anyone is willing to help for free id love if u could DM

#

its a rlly small code that i cant debug

copper grotto
#

How much would it be for a Sword System, with Framework, M1 Combos, Parry, all that stuff

#

30k robux?

slender yew
copper grotto