#code-discussion

1 messages · Page 45 of 1

tight pewter
#

whats a m1 script

atomic sandal
tight pewter
#

yeah there is a bunch of different ways too handle a punch

atomic sandal
#

yeah im kinda new

#

whats the easiest way to handle

magic galleon
#

Programming nerds

tight pewter
#

i wouldn't say any of the methods are "easy" for someone new.

atomic sandal
atomic sandal
tight pewter
atomic sandal
#

aight ty

tight pewter
#

just playing the punch animation is simple though yeah

#

enjoy

#

when actually doing the combat system / hit detection look on youtube/forums and see what system you like the most.

#

combat can be a broad subject

atomic sandal
#

aight

wide comet
#

Someone can help me in vscode luau lsp setup?

ocean valley
#

Looking to Start a Roblox Game Studio!
I'm looking to start a Roblox game studio where we can collaborate on multiple games and projects.

I’m also looking for a co-owner or co-owners to help lead and shape this journey with me. If you're interested in building something cool together, feel free to DM me or reply to this post!

tropic plume
#

hey guys, im making a group project and im experiancing an issue with the animations loading only i can see them
could it be bc of the ownership of the anims?
i have them posted under the group that the games made under

vernal peak
#

why not just use remote functions instead of remote events? what is the difference

ancient jetty
carmine tapir
ancient jetty
#

What he said

carmine tapir
#

You’re faster lol

red bramble
#

if i want an undo feature for a building system, do i clone the "before" parts and spawn it back when ctrl + z is pressed, or do i save the "before" state of the property of the parts and apply it to the parts when ctrl + z is pressed

#

they're having an argument over in #code-help so please forgive me for asking it here

lofty plinth
#

Personally i'd properties

copper jay
#

roblox broke a lot of stuff with them changing the fact u can't use .Chatted in local scripts anymore

night maple
#

I'm unable to find clickdetectors in 2 tools I have located 😭

    local cc = i:WaitForChild("ClickDetector")
    
    i.MouseClick:Connect(function(plr)
        print(plr.Name)
    end)
end```
night maple
#

it was prolly like if plr.chatted then sillysound:play()

copper jay
#

just kinda annoying

serene kernel
#

Guys quick question, I wanted to know if someone (for exemple myself) would be able to start doing commission after following (and learning) both beginner and advanced brawldev scripting guide or if I had to still try to do stuff on my own, been watching the #scripter-hiring for a while and everything seems uh, overwhelming

ancient eagle
#

Is there any way to make it so if a server has 1 less than the server maximum, the user will be redirected to a different server, or just being prevented totally from joining that server at all when clicking play?

craggy abyss
#

a

candid bobcat
#

i am making a pathfinding script for a horror game but during test i found out that if the monster kills someone just stand still and doesn't go after the other players
can someone help me with this what did i do wrong

fossil current
#

Scripting is too hard

#

How long does it take to be good

serene kernel
#

Depends what you define by "good" as well

fossil salmon
fossil current
serene kernel
#

kinda

fossil current
fossil current
#

Like how how would I take to be able to do scripting like that good

serene kernel
#

what ressources u use for learning

fossil current
serene kernel
#

well you have youtube and roblox dev hub I'd say

#

I'm learning from youtube currently

#

from brawldev who has the most recent playlist

#

but I tried thedevking back then and it was good

#

just make sure to make something yourself by the end of every video using what you learnt

#

else you will not remember a thing

#

and btw if you take away all the gamepass stuff etc.. the base of the game is pretty easy

#

just think of that game when you watch these videos and how the game (hide or die) might implement it in their game (that stuff is helping me alot understand hard concept like pairs and ipairs or events)

fossil current
mint cloud
#

Personally, I just binged TheDevKing

violet leaf
#

hey! i have a question about scripting because i recently just started
i watched a tutorial video on a little bit of the basics like making a kill brick, boleans, e.t.c
i wanted to know what should be my first step forward to becoming a better scripter

violet leaf
mint cloud
oblique epoch
#

lf a good scripter to make a game for fun ill pay btw

waxen echo
#

Im learning from a master coder

#

The best

#

The biggest

#

The strongest

#

I love yall

somber vault
waxen echo
somber vault
#

You‘ve got to know him

waxen echo
#

Who is that 🙀

#

Omg 😱

somber vault
waxen echo
#

Oh no i looked it up

#

And i see now

#

No i learn from a personal mentor

somber vault
#

Sorry man

#

Didn’t know I was talking to a rich man

#

I apologize

waxen echo
#

Yes buckets full of cash

#

Jk no im rich because my bro is very good at coding and we learn with each other and get better together

#

We learn new things together and work on all aspects of are games together

rugged mist
#

some rare stuff

#

what games has he worked on

waxen echo
#

And the better i get at coding the more smooth are system becomes

rugged mist
#

this master coder

waxen echo
#

Oh i can show u

rugged mist
#

sure

waxen echo
#

Worked on royal high before did security

#

Worked on are own games called lightdash

#

Invasion

rugged mist
#

What’s his user

somber vault
#

help...

#

cna get ts off ym screan

waxen echo
#

Go to my user then click fyooze games

#

Then check who owns it

rugged mist
#

What’s ur user

waxen echo
#

Dang mb

mint cloud
waxen echo
#

Just look up 3dengineer

mint cloud
waxen echo
#

Or look up expert_gamecreations

#

Developercodes

somber vault
rugged mist
#

That’s not even a person

somber vault
#

im not into gui

rugged mist
somber vault
waxen echo
somber vault
rugged mist
strange raven
#

@waxen echo deleting or changing your messages doesn’t stop moderation. Behave yourself.

waxen echo
#

Expertgame_creations

somber vault
rugged mist
#

Fyoozegames has 2 members

mint cloud
#

XD

mint cloud
somber vault
waxen echo
#

Lol

mint cloud
somber vault
rugged mist
#

you’re 3dengineer?

waxen echo
#

Yeah

rugged mist
#

Mmmm

waxen echo
#

Hmmm

#

Lol

rugged mist
#

so he’s a master coder

waxen echo
#

Basically yes

somber vault
rugged mist
#

because they worked security on royal high

somber vault
#

im gonna cry

somber vault
waxen echo
#

We have worked on a lot of clients

rugged mist
#

ok

somber vault
waxen echo
#

Check the friends im even friends with ice7 royal highs coder

mint cloud
somber vault
#

sigh

waxen echo
#

Anyways its really not a big deal

somber vault
#

im gonna cry it int working 😭

rugged mist
#

how do you know so many master coders

somber vault
waxen echo
#

I dont

waxen echo
somber vault
#

sigh

rugged mist
#

I’d like to consider myself a master coder myself

#

that’s why I was curious

waxen echo
rugged mist
waxen echo
#

Yo

#

What is it

#

I don’t press links

rugged mist
#

its a roblox link lol

bleak glade
#

ill believe you when your accounts linked

waxen echo
#

Dont care link = dont press

rugged mist
#

how do you do that

oblique epoch
#

whoever does ui pm me asap im paying good per task simple simulator ui

somber vault
bleak glade
waxen echo
#

Because i have some ui already

waxen echo
somber vault
somber vault
rugged mist
#

@somber vault is that bettter now

oblique epoch
somber vault
somber vault
somber vault
rugged mist
bleak glade
waxen echo
somber vault
rugged mist
#

im a full time roblox developer lol

waxen echo
#

Sorry bro my bro is definitely better

rugged mist
#

lmao

somber vault
waxen echo
#

And we dont even do it full time

rugged mist
#

u dont work on a game that has 5 billion+ visits

bleak glade
somber vault
rugged mist
#

for version control

bleak glade
rugged mist
#

we have our own framework

#

in house made

somber vault
#

Are you calling the function?

bleak glade
#

for client/ server? or for everything

rugged mist
#

everything

#

custom networking modules

bleak glade
#

damn thats impressive

somber vault
waxen echo
somber vault
rugged mist
#

we use a networking module where we only have 2 remote events for the whole game

bleak glade
somber vault
#

That function needs to be called somewhere, in order to work

rugged mist
bleak glade
somber vault
rugged mist
#

getting 5billion+ visits on a game is the basics?

rugged mist
#

who is this kid

rugged mist
somber vault
rugged mist
waxen echo
#

Thats not what i said lol and its not impressive bragging about 5b visit

#

You weird

tepid slate
#

#hi

rugged mist
#

LMAO

waxen echo
#

Humble yourself

somber vault
somber vault
rugged mist
#

u literally came into this chat bragging about your bro who worked on royal high

somber vault
rugged mist
#

and hes a master coder

#

and how youre locked

#

u humble urself

bleak glade
somber vault
rugged mist
#

it just cleans up script connections etc

#

we also use pure lua bindable events

somber vault
bleak glade
rugged mist
#

yeah pretty much

#

like good signal with a callback cache

rugged mist
#

that allows you to call anything anywhere on the same side

somber vault
rugged mist
#

just like you would call a signal

waxen echo
#

I don’t understand what you mean by that anyways. Its true i said i learn from a master coder you didnt need to even interact with it could have just let me say good stuff about people

rugged mist
#

u just gotta call the module

somber vault
bleak glade
#

across the server and same client

waxen echo
#

You started acting like anyone should care you work on a game with 5b visit

somber vault
# somber vault example

Button.Activated:Connect(function()
desiredFrame.Visible = false
end)

Simple close button mechanic

waxen echo
#

We don’t because you weird

bleak glade
rugged mist
#

i work on 10bill+ visits

somber vault
#

But it’s up to you

somber vault
waxen echo
somber vault
rugged mist
mint cloud
rugged mist
waxen echo
rugged mist
#

yeah u just said "filthy rich"

waxen echo
#

And i said jk in front of the message

somber vault
rugged mist
somber vault
#

liek this

bleak glade
rugged mist
#

so you can use it on either

somber vault
#

ok

waxen echo
#

Filthy rich could mean anything

#

You the one with some issue

mint cloud
rugged mist
#

yeah you were definitely bragging about how you were filthy rich in health

somber vault
waxen echo
#

It was clearly not ment to hurt anyones feelings

somber vault
somber vault
waxen echo
#

I was just saying im thankful to have that opportunity to learn from my mentor

#

Get a grip on reality

rugged mist
#

lol

somber vault
somber vault
somber vault
somber vault
waxen echo
# rugged mist lol

You must not be functioning correctly you think anyone respects that attitude

somber vault
#

Like where each button, frame and whatnot, is located it

#

AHHH

#

nvm

rugged mist
waxen echo
#

You need to grow up

somber vault
#

bruh ima stick to making clothes

#

actually nvm

waxen echo
#

But u did prove how childish you are

somber vault
#

You both are

#

its not working 😭

#

sigh gotta start from start

rugged mist
waxen echo
somber vault
somber vault
somber vault
rugged mist
somber vault
somber vault
rugged mist
#

send code thats broken

#

and format it in lua

somber vault
#

He is trying to manage multiple frames by pressing buttons, in one function

#

bruh

waxen echo
#

Its such a mess it makes me tired

#

I cant look at it

cunning basalt
#

bro cant even make gui close 💀

somber vault
#

Everyone starts somewhere

#

Atleast have the balls to help

cunning basalt
#

that's the only problem?

oblique epoch
#

pm to script and make ui for an entire game (simulator VERY simple) pay is 20-30k robux

cunning basalt
#

i can sense that ur rngui is not in ur gui and the way ur making the variable gui = plr.playergui.maingui is the wrong way to get it

vernal peak
#

where do I store a tool

restive ibex
#

Is there a rank system between scripters ?

somber vault
tawdry terrace
#

how to make my ball physic beter

vernal peak
somber vault
#

You give them on the Server

rugged mist
rugged mist
near wing
#

yo does anyone know how to optimize ur game

#

my game uses a lot of zombies but they lag when they walk since there are a lot

somber vault
rugged mist
maiden nacelle
#

Is Humanoid:GetHumanoidDescription() functional with r6?

hardy needle
#

can i connect a boolvalue from serverscriptservice to topbarv3 like to show hitboxes??

rugged mist
#

all humanoids have that

#

regardless of their limb amounts

rugged mist
hardy needle
hardy needle
#

and im wondering if i can connect a boolvalue

rugged mist
#

you can do whatever you want

hardy needle
rugged mist
#

yeah u can

#

u would just have the button action connected to a script that highlights players through walls

#

I’m sure top bar buttons have a signal to connect to and require that you connect the buttons to

hardy needle
wanton cloud
#

Should i keep all my abilities in one module or make an indiviual module for each one?

copper heart
#

anyone want to make a small easy plugin? ill provide the needed assets you would just need to script

vagrant shoal
copper heart
somber vault
fluid galleon
#

Bro look at this optimization lol

tight pewter
#

a lot of people come in servers/forums like these and aren't very self-sufficient or have some form of "learned helplessness"

#

for example, having a 100 message conversation about something basic that could be googled or found in a manual in 5 seconds.

#

its just proper etiquette to look into things yourself first

broken minnow
fluid galleon
# broken minnow Atleast show it working not just a print output

Its a searching algorithm integrated with pathfinding service (cannt show the output cuz i dont have permission to share anything about this project), you can compare it with like clash of clans path finding like how the troops search for there target and try to reach there by breaking as much low walls as possible

winter anchor
#

anyone on?

fluid galleon
winter anchor
#

Is using character attributes the best way to set states, or is there a better way?

remote bear
stone root
#

wtf

#

i was reading >:c

winter anchor
winter anchor
# stone root mhm

so like having say I have 1000 attributes for a bunch of states in my game, is that the best optimization i can do?

stone root
winter anchor
stone root
#

cant rly say much on combos, cus the one i made is based on addition over inf time, but if u want to make a chained combo, just use the clock function and calculate the time in seconds u want in between the click events to create combos, no need for states on the object's attributes.

night maple
#

is there a way to check if the other argument = something?

#

so for example if ANY of the arguments equals 0 then I run the same code

#

ion think I can put "or" in the argument lol

ruby cipher
#

Use it within ()?

night maple
ruby cipher
#

Oh wait i misread your question

night maple
#

I mean I already took a roundabout so its fine

#

instead of trying to do what I said I just split the arguments with diff functions

#

its LUAU memory so ion think its gonna affect preformance

ruby cipher
night maple
ruby cipher
#

No you just call the function whenever u want

#

Or you want it to check each time a value changes maybe

broken zodiac
#

anyone here interested in making a game about fighting in planes?

#

im a buiulder with 1.5 yrs of experience

remote bear
uneven crown
plucky owl
#

Hello, can you help me? I have a rebirth button that i want to use for rebirths. If a player reaches a set amount of stages then the player would be sent at the start but i can't script. Im almost finished with my game. I'll be glad for any help. If you can help please DM me.

severe bloom
tight pewter
remote bear
tight pewter
#

what are you using btw?

#

editableimage? or 1x1 frames as pixels

severe bloom
#

bro just use a path2d 😭

#

theres no way you have to clear and create those frames on demand

tight pewter
#

damn i didn't even know that was thing

#

i need to get up to date lmao

severe bloom
remote bear
tight pewter
#

i haven't really used it yet, but im about to play with it soon

remote bear
severe bloom
tight pewter
#

idk seems pretty fast too me (for intermediate graphics at least) @severe bloom

severe bloom
#

weird ill take a look into it again

#

atleast for my water renderer it was stupidly laggy

tight pewter
#

it may have been pretty bad when first released idk

#

or just the algorithms you used maybe

severe bloom
tight pewter
#

water stuff is usually pretty hefty though so idk lol

#

maybe

severe bloom
tight pewter
#

for intermediate graphics (and not direct access to the gpu) its pretty hefty *

#

but yeah seems fast ash too me, from looking at those examples atleast

severe bloom
#

i wish roblox would give direct access to the gpu 😭 but its too insecure

tight pewter
#

letting us write shaders would be fire at least

severe bloom
#

honestly

#

that would be so cool

tight pewter
#

ong

#

inb4 people make hacky unoptimized shaders with this

severe bloom
#

ye

night maple
#

what can I use to record clips of my work? gyazo is too short

night maple
languid mirage
#

Does anyone know why my webhooks work on studio but not on roblox

proven egret
#

im making a fun obby guys would anyone be down to help with some scripting , building levels , modelling etc dm me if u wanna join its a fun journey we can share the earnings we get 😄

spiral jungle
#

Yes

hardy pilot
hardy pilot
radiant ice
#

I'm still learning but I don't understand anything about scripting...

somber vault
tulip ice
#

i read a forum from back then and it seemed like there was no solution before

somber vault
#

What’s the issue?

tulip ice
#

but they're both start places

spiral jungle
somber vault
#

Yeah

#

You need to use Places

#

You publish the Game to the Lobby Game it‘s Places

radiant ice
#

Best way to learn scripting?

coral prawn
tulip ice
tulip ice
#

i couldn't find it

tulip ice
#

as a new place

somber vault
#

If you’ve done everything as I said, you should find it there

tulip ice
#

ill retry

#

oh the name was changed i thought it was the new place i made before

#

thanks for the help i appreciate it

somber vault
#

No problem

tight pewter
flint moon
#

who here can script good and is intrested in making a gamewho here can script good, if u can dm me

latent geyser
#

what is this?

hardy pilot
latent geyser
#

is it normal?

hardy pilot
#

Sort of

#

Roblox likes to be a little silly sometimes

vagrant shoal
# latent geyser is it normal?

Yes and no in the sense that there’s almost nothing you can do. WiFi prolly bugged out a little bit and it triggered the warnings

vagrant shoal
latent geyser
#

alr tysm for helping

vagrant shoal
#

Just check your WiFi and if it’s good it was probably a one off thing

latent geyser
vagrant shoal
#

Some people js can’t understand no means no

#

Every time it’s “who can make a full game”

#

Like there is some wizard that can be a one man team

silver gale
#

guyss help whats rongg

#

local rainspwaned = 0
local rainthingss = math.random(1,1000)

while true do
if rainspwaned >= rainthingss then
break

end
local randomnumber = math.random(1,53)
local randomnumber2 = math.random(1,53)
local randomnumber3 = math.random(1,53)
rainspwaned = rainspwaned + 1
wait()
local rain = Instance.new("Part", game.Workspace )
rain.Size = Vector3.new (0.5,2,0.5)
rain.Position  = Vector3.new (randomnumber,randomnumber3,randomnumber2)
rain.Transparency = 0.5
rain.Anchored = false
touched = game.Parent.Touched:Connect(function(hit)
    if rain.touched.player then
        game.Players.HumaniodHealth = 75
    end
end)
#

like the touched part doesnt work

coral prawn
silver gale
#

ooh and whats the porblem with the names?

#

game.Workspace.Part.Touched:Connect(function(hit)
local character = player.Parent
local humanoid = character:FindFirstChild("Humanoid")
local playerCash = player.leaderstats.Cash
if humanoid then
playerCash = playerCash + 1
end

end) help

#

why do i suck so much at scripting

ivory gate
#

had 4 people play my game (with roblox premium) for 45 mins but i dont see anything in premium payout anyone know why?

silver gale
oblique epoch
#

i think

#

lf a scripter to collab with i do ui i js want to make a simple game (i can invest 100k+ in ads)

little wind
#

can someone rate my portfolio?

rotund pawn
#

I have an elevator with prismatic constain, but player jumping slowly it down, why? I have force on amx

#

max*

hexed palm
#

How much time should I dedicate to learning luau basics?

onyx inlet
#

"no"

#

to these type of people

somber vault
quiet pasture
#

Dude, what am i doing wrong? I can't get a single commission even though I have great coding skills and 2 years of experience, what do I do?

latent geyser
#

oh god

#

im understanding now how datastore works

sacred lily
#

I've acquired a data management system with session locking but I have no knowledge of Roblox physics

#

And honestly I don't know which one of them is harder to acquire

sacred lily
#

None of those in #scripter-hiring will respond to you but they will keep reposting

somber vault
#

i wnna add images how

latent geyser
somber vault
#

and?

#

will it mess up my script or

latent geyser
#

nah

#

like this

somber vault
#

and how do i add an image

latent geyser
somber vault
#

hmm

#

ok

austere mulch
#

40 minutes - 1 hour

latent geyser
#

fr fr

#

i learned it with this way

somber vault
#

so how do i add an image

sturdy seal
#

guys i got a question if i make a script that prompts a favrioute option can i make it a one time only reward for doing so and how

latent geyser
#

in image thing

sturdy seal
somber vault
#

kk

latent geyser
somber vault
#

how do i make ts dark mode light mode is killing me

sturdy seal
somber vault
#

nvm

latent geyser
#

alr

sturdy seal
#

local MarketplaceService = game:GetService("MarketplaceService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ProductPurchasedEvent = ReplicatedStorage:WaitForChild("ProductPurchasedEvent")

MarketplaceService.ProcessReceipt = function(receiptInfo)
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
if player and receiptInfo.ProductId == 3262930693 then
ProductPurchasedEvent:FireServer(player, receiptInfo.ProductId)
return Enum.ProductPurchaseDecision.PurchaseGranted
end
return Enum.ProductPurchaseDecision.NotProcessedYet
end

#

WHATS WRONG

#

With it

somber vault
#

Why does this not fire?

local function HandleRespawn(player)
    player.CharacterAdded:Connect(function(character)
        local spawnLocation = player:GetAttribute("SpawnLocation")
        if spawnLocation then
            if ServerSettings.Hardcore == true then
                PlayerDistances[player.UserId] = 0
            end
            local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
            humanoidRootPart.CFrame = spawnLocation
            print("Player respawned at checkpoint:", player.Name)
            print(PlayerDistances)
            local info = {}
            player.CharacterAdded:Connect(function()
                info.Distance = PlayerDistances[player.UserId]
                print(info)
                DistanceUpdateEvent:FireClient(player, info)
            end)

        end
    end)
end
#

It does not work when I try using the CharacterAdded function or whatever. It just doesn't want to fire.

#

info prints just fine, it all works as expected but the FireClient just doesn't work, eventho later down in the script I fire exactly the same var with the same info and it does work.

sturdy seal
somber vault
sturdy seal
#
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ProductPurchasedEvent = ReplicatedStorage:WaitForChild("ProductPurchasedEvent")

MarketplaceService.ProcessReceipt = function(receiptInfo)
    local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
    if player and receiptInfo.ProductId == 3262930693 then
        ProductPurchasedEvent:FireServer(player, receiptInfo.ProductId)
        return Enum.ProductPurchaseDecision.PurchaseGranted
    end
    return Enum.ProductPurchaseDecision.NotProcessedYet
end ```
#

huh

somber vault
#

no

#

`

sturdy seal
#

bro

vagrant shoal
#

Do you understand the problem here

#

You likely intended to do something after the character spawns, not set up a second connection

sturdy seal
#
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ProductPurchasedEvent = ReplicatedStorage:WaitForChild("ProductPurchasedEvent")

MarketplaceService.ProcessReceipt = function(receiptInfo)
    local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
    if player and receiptInfo.ProductId == 3262930693 then
        ProductPurchasedEvent:FireServer(player, receiptInfo.ProductId)
        return Enum.ProductPurchaseDecision.PurchaseGranted
    end
    return Enum.ProductPurchaseDecision.NotProcessedYet
end ``` why does this not work its supposed to check if you purchased the product and turn the text label timer to 0
somber vault
# vagrant shoal Your function HandleRespawn sets up a CharacterAdded connection, which works the...

I've tried it without that and it still doesn't properly fire,
Like this:

local function HandleRespawn(player)
    player.CharacterAdded:Connect(function(character)
        local spawnLocation = player:GetAttribute("SpawnLocation")
        if spawnLocation then
            --if ServerSettings.Hardcore == true then
            --    PlayerDistances[player.UserId] = 0
            --end
            local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
            humanoidRootPart.CFrame = spawnLocation
            local info = {}
            info.Distance = PlayerDistances[player.UserId]
            print(info)
            DistanceUpdateEvent:FireClient(player, info)
        end
    end)
end

It prints:
{
["Distance"] = 1
}
As expected, yet in my local script:

local function UpdateUIDistance(info)
    print("fired", info)
    if info then
        if info.Distance or info:isA(string) then
            CurrentDistance.Text = tostring(info.Distance) or info
        else
            CurrentDistance.Text = "WARN, NO NUMBER GIVEN"
            warn("No Distance given to", game.Players.LocalPlayer, "error.")
        end
    else
        CurrentDistance.Text = "0"
    end
end

DistanceUpdateEvent.OnClientEvent:Connect(UpdateUIDistance)

It does not work, the fired doesn't actually end up printing

vagrant shoal
#

Here’s the correct version

local function HandleRespawn(player)
player.CharacterAdded:Connect(function(character)
local spawnLocation = player:GetAttribute("SpawnLocation")
if spawnLocation then
if ServerSettings.Hardcore == true then
PlayerDistances[player.UserId] = 0
end
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
humanoidRootPart.CFrame = spawnLocation
print("Player respawned at checkpoint:", player.Name)
print(PlayerDistances)

        local info = {}
        info.Distance = PlayerDistances[player.UserId]
        print(info)
        DistanceUpdateEvent:FireClient(player, info)
    end
end)

end

sturdy seal
#
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ProductPurchasedEvent = ReplicatedStorage:WaitForChild("ProductPurchasedEvent")

MarketplaceService.ProcessReceipt = function(receiptInfo)
    local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
    if player and receiptInfo.ProductId == 3262930693 then
        ProductPurchasedEvent:FireServer(player, receiptInfo.ProductId)
        return Enum.ProductPurchaseDecision.PurchaseGranted
    end
    return Enum.ProductPurchaseDecision.NotProcessedYet
end ``` why doesnt this work
somber vault
#

Try this:

local MarketplaceService = game:GetService("MarketplaceService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ProductPurchasedEvent = ReplicatedStorage:WaitForChild("ProductPurchasedEvent")

MarketplaceService.ProcessReceipt = function(receiptInfo)
    local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
    if player and receiptInfo.ProductId == 3262930693 then
        ProductPurchasedEvent:FireClient(player, receiptInfo.ProductId)
        return Enum.ProductPurchaseDecision.PurchaseGranted
    end
    return Enum.ProductPurchaseDecision.NotProcessedYet
end
vagrant shoal
somber vault
#

Responded to the wrong message lol @sturdy seal

latent yoke
somber vault
# vagrant shoal your server-side code looks correct if it’s printing the info table with a Dista...

Yeah, later down in the script I use this tho:

            local info = {
                Distance = DistanceNumber,
                FurthersPlayerDistance = FurthersPlayerDistance,
                SectionName = tostring(selectedSection.model)
            }
            local playerID = player.UserId
            PlayerDistances[playerID] = DistanceNumber
            DistanceUpdateEvent:FireClient(player,info)

Which does work and prints:

fired  ▼  {
                    ["Distance"] = 1,
                    ["FurthersPlayerDistance"] = 1,
                    ["SectionName"] = "section1"
vagrant shoal
#

DistanceUpdateEvent must be accessible both on the server and client. That usually means it’s in ReplicatedStorage.

Check that DistanceUpdateEvent is parented to ReplicatedStorage and both scripts are referring to the same instance

You can confirm with

print(DistanceUpdateEvent:GetFullName())
on both server and client to ensure they match.

somber vault
#

Yeah it's in ReplicatedStorage

vagrant shoal
#

Make sure the LocalScript is running

A LocalScript only runs in:
• StarterPlayerScripts
• StarterCharacterScripts
• StarterGui
• PlayerScripts
• Tools / GUI buttons

If it’s in ServerScriptService, it will do nothing.

latent yoke
elfin karma
#

can someone help me remove everything in backpack

vagrant shoal
# vagrant shoal Make sure the LocalScript is running A LocalScript only runs in: • Start...

Is UpdateUIDistance being connected before the event fires?

Sometimes the server fires the event before the local script connects to OnClientEvent.

To test, add a delay on the server before firing like so -

task.delay(1, function()
DistanceUpdateEvent:FireClient(player, info)
end)

If this fixes it, your local script is just connecting too late. A better long-term fix would be to store the distance and let the client request it after it’s ready.

somber vault
#

It's in StarterGUI
The local script works, and it works fine in the other part in my Script. Yet it's breaking earlier on in the script

latent yoke
#

Put it in starterplayerscripts

somber vault
#

let me try

vagrant shoal
#

info:isA(string) is invalid

This line: if info.Distance or info:isA(string) then

#

info is a table, and :IsA() is only valid on Roblox instances. You’re probably getting a silent error here.

somber vault
#

This:

            task.delay(0.5,function()
                DistanceUpdateEvent:FireClient(player,info)
            end)

Results in the same issue,

#

I'm just extremely confused as to why it does work in line 200ish (Exactly the same code mind you!) and does not work in line 140.

#

I'll try making it a function and see how that goes 🤷

vagrant shoal
#

Where is handlerespawn being called

#

You don’t really need a function to handle an rbxscriptconnection

#

What’s player:GetAttribute(“SpawnLocation”)?

#

That doesn’t work if you don’t set it up beforehand

somber vault
#

That all does work

#

Mi amor, the only thing that doesn't work is the distance update part.

#

I'm figuring out whats up so gimme a sec

desert osprey
#

was having fun with the basics, its my first "big" code can you rate it?

somber vault
#

Figured it out 👌

vagrant shoal
plucky owl
#

Hello, can you help me? I have a rebirth button that i want to use for rebirths. If a player reaches a set amount of stages then the player would be sent at the start but i can't script. Im almost finished with my game. I'll be glad for any help. If you can help please DM me.

latent yoke
desert osprey
vagrant shoal
desert osprey
latent yoke
somber vault
# vagrant shoal What happened

It was changing the value too quickly after respawning, basically changing the value of the PlayerGUI that was still the "old" one, before respawn. I added a single wait() in the function and it now works for both progressing and for respawning.

vagrant shoal
#

Ah alright

latent yoke
#

You shouldn’t try to make your code complex 😂

vagrant shoal
somber vault
#

Still confused as to why Task.Delay didn't solve it since that's basically doing the same thing

vagrant shoal
#

Wait pauses the thread

#

Delay is parallel

vagrant shoal
snow hinge
#

(or, check the api to help get your fundamentals down (?))

somber vault
desert osprey
snow hinge
somber vault
#

Its not teleporting me

#

tryna mke a teleporting system

snow hinge
#

you can't send that video with no context and say help bro

somber vault
#

mb

snow hinge
#

you have no function that actually teleports the player

somber vault
#

huh

#

so delet that sentence?

plucky owl
#

Hello, can you help me? I have a rebirth button that i want to use for rebirths. If a player reaches a set amount of stages then the player would be sent at the start but i can't script. Im almost finished with my game. I'll be glad for any help. If you can help please DM me.

snow hinge
#

fix line 11 of your script

somber vault
#

11 or 10...

snow hinge
proven vector
#

can anyone help my gun isnt shooting

vagrant shoal
snow hinge
# somber vault 11 or 10...

you use Vale instead of Value multiple times and your syntax is incorrect when you're setting the CFrame of the hrp

latent yoke
snow hinge
proven vector
snow hinge
vagrant shoal
proven vector
#

doesnt shoot or make sound or anything like that

latent yoke
vagrant shoal
proven vector
#

why

latent yoke
proven vector
#

too long

vagrant shoal
#

No ones opening it people are scared of getting a virus

proven vector
#

i dont have nitro

latent yoke
proven vector
#
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local Camera = workspace.Camera
local RunService = game:GetService("RunService")
local uis = game:GetService("UserInputService")

local ViewModel2

local equipped = false

tool.Equipped:Connect(function()
    equipped = true
    game.ReplicatedStorage.ViewModel2:Clone().Parent = Camera
end)

tool.Unequipped:Connect(function()
    equipped = false
    ViewModel2 = Camera.ViewModel2
    ViewModel2:Destroy()
end)

local swayCF = CFrame.new()

RunService.RenderStepped:Connect(function()
    if player.Character.Humanoid.Health <= 0 then
        if Camera:FindFirstChild("ViewModel2") ~= nil then
            workspace.Camera.ViewModel2:Destroy()
        end
    end
    
    if equipped == true then
        if Camera:FindFirstChild("ViewModel2") ~= nil then
            Camera.ViewModel2:SetPrimaryPartCFrame(Camera.CFrame)
            for i, v in pairs(Camera.ViewModel2:GetChildren()) do
                if v:IsA("BasePart") then
                    v.CanCollide = false
                end
            end

            local mouseDelta = uis:GetMouseDelta()/50

            local swayX = math.clamp(mouseDelta.X, -0.1,0.1)
            local swayY = math.clamp(mouseDelta.Y, -0.1,0.1)

            swayCF = swayCF:Lerp(CFrame.new(swayX, swayY, 0), 0.2)

            Camera.ViewModel2:SetPrimaryPartCFrame(Camera.CFrame * swayCF)
        end
    end
end)```
#

oh its short now?

#

how did that happen

#

ealierit said too long

vagrant shoal
#

That isn’t even near the limit

proven vector
#

remote.OnServerEvent:Connect(function(player, hitPart)
    if hitPart then
        if hitPart.Parent:FindFirstChild("Humanoid") or hitPart.Parent.Parent:FindFirstChild("Humanoid") then
            local humanoid = hitPart.Parent:FindFirstChild("Humanoid") or hitPart.Parent.Parent:FindFirstChild("Humanoid")
            if hitPart.Name == "Head" or hitPart.Parent.Name == "Hair" then
                humanoid:TakeDamage(60)
            else
                humanoid:TakeDamage(30)
            end
        end
    end
end)```
proven vector
#

too much

#

maybe i copy and pasted it

vagrant shoal
#

Your code is mostly fine in terms of structure, but there’s a critical missing piece: you’re not actually firing the BulletConnection:FireServer() remote event from the client script when clicking/shooting.

#

There’s no code handling input (like mouse click) to actually detect when the player wants to shoot and then call remote:FireServer(hitPart)

snow hinge
#

(and you have nothing playing sound; hence why.. you don't hear.. sound)

proven vector
#

im using tutorial

#

also there is a sound in the flash of the model

vagrant shoal
#

You need to handle user input (probably Mouse.Button1Down) in the client and raycast from the camera to determine what the gun hit.

vagrant shoal
proven vector
vagrant shoal
#

Just learn the fundamentals and learn the api bro 🥀

snow hinge
#

we are all equally dumb

vagrant shoal
#

It only takes 3 days to a week

vagrant shoal
snow hinge
#

practice and attempts makes you better

vagrant shoal
#

I started when I was 9

snow hinge
#

keep at it and you're all over it

latent yoke
snow hinge
latent yoke
vagrant shoal
#

I now have 6 years experience at 15 and sometimes I’m still dumb

austere mulch
snow hinge
#

wait ur me

vagrant shoal
proven vector
#

well i have been trying to ask for so long and nobody helps me at all in the #code-help section

proven vector
#

and i followed the tutorial perfectly i think

vagrant shoal
#

See tutorials are bs

rustic ember
#

bitc as nigas

latent yoke
vagrant shoal
#

After you get in studio and you wanna make cool stuff you realize that you need to learn for yourself

proven vector
#

yeah the correct script is too long

#

i cant send it unless its .txt

snow hinge
#

there are no tutorials on any topics that actually encompass a majority of what u need to know about programming on roblox

vagrant shoal
#

Tutorials are useful for seeing code applications but not much after that especially when you’re trying to follow precisely

#

Just learn lua fundamentals and learn Roblox api that’s literally it

proven vector
vagrant shoal
#

After a week you’re somewhat cruising

proven vector
#

also i dont know how its a virus in .txt you can see its a script

vagrant shoal
snow hinge
#

you only detect aiming and don't actually do anything with this information

#

you need to fire your gun when u click button

vagrant shoal
#

There’s lots of ways to hide a virus in a txt you should never trust anyone

latent yoke
proven vector
#

well i dont know what to do ill record the script instead then

snow hinge
#

if you're on pc you can see the txt fine

vagrant shoal
snow hinge
#

based as fuck

vagrant shoal
#

Yeah

latent yoke
snow hinge
#

discord disgusting

#

we should all use whatsapp

proven vector
#

bruh why is obs making pixelated videos

vagrant shoal
#

For me it was c++ c# and js

desert osprey
snow hinge
#

i never got past stage 7

proven vector
snow hinge
#

i cba setting up rojo

austere mulch
#

in order to learn it

desert osprey
proven vector
#

can someone pls tell me

#

whats wrong

latent yoke
proven vector
#

yeah thats not the issue

#

its for another script

vagrant shoal
# proven vector

It’s amazing that I know exactly which tutorial you are using

proven vector
#

what one is your guess

vagrant shoal
#

I forgot the name but I remember it well

#

Let me check

#

It’s a series

fluid galleon
fluid galleon
proven vector
#

read

#

"It’s amazing that I know exactly which tutorial you are using"

#

i said "what one is your guess"

#

also the animation has nothing to do with my issue

#

i cant shoot the gun or hear sound or anything like that

proven vector
#

its a completely different script haha

fluid galleon
#

if no err then whatever logic ur using its not appropiate

proven vector
#

well im using a tutorial ok

#

so i know nothing

vagrant shoal
somber vault
#

help please

latent yoke
somber vault
#

i try to teleport

vagrant shoal
vagrant shoal
#

loacation and location are not the same thing

latent yoke
latent yoke
#

Im pretty sure its doable

vagrant shoal
#

Yeah with enough dedication

#

I can say fs I’m strong with JS and C/C++

#

But C# is weird asl

latent yoke
#

Oh well js is ez

vagrant shoal
#

Python is also easy

latent yoke
somber vault
#

same error

vagrant shoal
#

Bro you didn’t fix anything

latent yoke
#

C# is DEF more ez than C/C++

somber vault
vagrant shoal
somber vault
#

before it was loacation and i chanched to location

latent yoke
vagrant shoal
#

😭

latent yoke
#

C is sooo hard

vagrant shoal
#

I js need more time

umbral carbon
vagrant shoal
#

I guess it’s different for some people

latent yoke
#

C# is ez asf

vagrant shoal
#

C and C++ was easy to pickup

umbral carbon
vagrant shoal
#

you spelled location wrong

#

You gotta pick one consistent spelling or the compiler won’t know what you’re trying to do

latent yoke
somber vault
vagrant shoal
#

lol

somber vault
#

wym variables

short nacelle
#

why doesnt thispart work

vagrant shoal
vagrant shoal
snow hinge
#

you heard him.

vagrant shoal
somber vault
#

ohh

#

mb

vagrant shoal
#

First off what is plrtext

#

A gui? A part?

short nacelle
vagrant shoal
#

And are displaynane and player name value base types?

#

Ok

#

You need to say plrtext.display name.TextColor3 = (color)

#

You have to index the property

latent yoke
short nacelle
vagrant shoal
#

Or the compiler will be confused

short nacelle
#

okay let me try

fluid galleon
vagrant shoal
#

?

somber vault
fluid galleon
vagrant shoal
#

Oh

fluid galleon
#

bro made me forgot my whole life

vagrant shoal
somber vault
#

yes

vagrant shoal
#

🥀🥀

somber vault
#

actually about to be 6 hours

#

but ye

vagrant shoal
#

Bro what

somber vault
#

this is my 46 run

short nacelle
#

@vagrant shoal i get this now

somber vault
#

and still get errors

fluid galleon
vagrant shoal
fluid galleon
#

its Color3.new()

vagrant shoal
#

You can’t make a color 3 type with just parentheses and numbers

short nacelle
#

huh

#

r u talkign to me

vagrant shoal
#

Oh yeah sorry if it was confusing

#

When you’re setting the color property of the gui

somber vault
vagrant shoal
#

You need to index the property which you did

short nacelle
#

so do textcolor3.nenw?

somber vault
short nacelle
#

new*

vagrant shoal
#

And then assign it a color3 value

fluid galleon
short nacelle
#

i give up

vagrant shoal
somber vault
#

u tell me

vagrant shoal
short nacelle
short nacelle
vagrant shoal
#

Color3.new()

fluid galleon
vagrant shoal
#

Also fix the spelling of the text label name in the code @short nacelle

snow hinge
vagrant shoal
somber vault
#

it still doesnt work 😭

fluid galleon
vagrant shoal
short nacelle
wise meadow
vagrant shoal
wise meadow
#

and PlayerName

fluid galleon
latent yoke
somber vault
#

script

vagrant shoal
# somber vault

Bro why are you listening for touched event on a script instance

short nacelle
#

@vagrant shoal i did that but it doesnt work now

wise meadow
#

Just a thought but why not Make it all via code? 👀

short nacelle
#

wait dont i need to clone the gui

vagrant shoal
fluid galleon
somber vault
vagrant shoal
#

Bro what 🥀🥀🥀🥀

short nacelle
#

error

somber vault
#

im dumb bro dare with me

#

bare

vagrant shoal
somber vault
#

or dare idk

static viper
#

Yo y'all, im doing a commission and the guy's paying me 2.5-3k for a full flight system, but ontop of that also made me do a wall destruction script where walls turn into debris and then get regenerated.

Is the pay fine? I'm asking cuz I really don't know

somber vault
#

charge him 5k

somber vault
#

ez robuz

short nacelle
wise meadow
vagrant shoal
#

Plrtext.DisplayName.TextColor3 = Color3.fromRGB(r, g, b)

#

This is what it should look like @short nacelle

short nacelle
#

okay

static viper
#

Aight noted y'all, thx

fluid galleon
snow hinge
vagrant shoal
#

That’s chicken change bro

wise meadow
somber vault
#

AHHHHHHHHHHHHHHHHHHHhhh

#

im gonna cry

static viper
fluid galleon
somber vault
#

its not working

wise meadow
#

Plrtext.DisplayName.TextColor3 = Color3.fromRGB(123, 456, 789)

#

best color trust

somber vault
#

ive been doing this for 5hr 26mins

snow hinge
vagrant shoal
fluid galleon
short nacelle
#

@vagrant shoal i did it, no errors but it doesnt work in game the color didnnt change from white to red

somber vault
#

its not freakign working

#

AHJKL:"

short nacelle
fluid galleon
somber vault
#

oh

vagrant shoal
somber vault
#

thats all i says

#

liek dead

snow hinge
somber vault
static viper
short nacelle
vagrant shoal
fluid galleon
somber vault
#

😛

static viper
somber vault
snow hinge
#

yeah you need to backtrack

somber vault
#

oh dam

vagrant shoal
snow hinge
#

there's been a gap in your education

fluid galleon
wise meadow
#

😭

vagrant shoal
somber vault
wise meadow
somber vault
vagrant shoal
somber vault
#

how

vagrant shoal
#

“Touched” events are not members of scripts my guy

fluid galleon
somber vault
fluid galleon
#

chatgpt do it i just enjoy

snow hinge
vagrant shoal
#

That’s bs

wise meadow
snow hinge
ember pollen
wise meadow
fluid galleon
wise meadow
#

use cursor

somber vault
wise meadow
#

your brain is rotted

#

i dont think u can do this with ur brain cells

#

Just let Cursor do it for u

vagrant shoal
#

You have to set the teleport variable to the part you are trying to touch to teleport

wise meadow
#

or Augment for VSC

somber vault
#

soo in stead of touche dwhat to put

fluid galleon
snow hinge
#

@somber vault your location part is not an actual part, it seems to be named LocationScript.

you need a physical object

#

resolve this first

somber vault
fluid galleon
snow hinge
somber vault
#

hmm

wise meadow
#

this is fun to watch

snow hinge
#

you can't teleport to it because it isn't a physical object

vagrant shoal
#

Low self sufficiency

somber vault
#

here right 💓

vagrant shoal
#

😭😭

wise meadow
#

bruh

vagrant shoal
#

Good job bro that’s the main issue

snow hinge
somber vault
#

hmm

fluid galleon
#

I gave up

vagrant shoal
#

Set the teleport part to part1

snow hinge
somber vault
#

wait

vagrant shoal
#

And set the location part to part

snow hinge
#

ignore the shitters i will assist u

wise meadow
#

Im losing knowledge of how to code just reading this chat

vagrant shoal
#

Your variables are defined all wrong

somber vault
#

so liek the location should be part and teleport script part 1?

vagrant shoal
#

Yes

somber vault
#

hmm

#

OKAY

wise meadow
vagrant shoal
#

6 hours of ya day bro

snow hinge
snow hinge
pastel barn
#

what is something i can make for to apply?

wise meadow
wise meadow
snow hinge
#

api*

somber vault
#

liek dis

vagrant shoal
#

Make it bigger and fit the close button to style

#

Also use an aspect ratio constraint for the square shape