#code-discussion

1 messages · Page 14 of 1

outer bridge
#

what function am i using

#

well your MY indian daddy

#

and im one of your 26 other kids

sour vine
#

so u R a kid

outer bridge
#

yes

#

im 13 🔥

sour vine
#

@discordfederalagency

outer bridge
#

WHAT FUNCTION DO I USE

#

TO CHECK IF REMOTE EVENT IS FIRED

sour vine
#

send pic cathello

#

i like it smol

#

the code

outer bridge
#

woah

#

ok ill send

#

2 seperate scripts fyi

latent tapir
#

nah gng

#

i do NOT trust you twin

outer bridge
outer bridge
#

its called something like happy beige

#

or sumert

#

yup

sour vine
#

lil blud why zefek u making stuff up

#

delete ze mozer feker while loop

outer bridge
sour vine
#

what ze fek u want it to do when fired lil bro

junior ridge
outer bridge
sour vine
outer bridge
#

to use to check if the event is fired

#

i know what to do after that

junior ridge
sour vine
outer bridge
sour vine
#

u need to fill the fireclient()

outer bridge
#

send it here

outer bridge
junior ridge
#

just tell me why it isnt doing the thing i want

sour vine
junior ridge
#

i want the ui to tween to a specfic udim2 but its tweening somewhere different

outer bridge
junior ridge
#

yes i did

outer bridge
junior ridge
#

bruh

sour vine
outer bridge
outer bridge
# sour vine WHAT U WANT IT TO DO

so theres 2 scripts, one where the print thingy happens and the remote event is fired and the other one has the leaderstats. how do i connect the two because i want the value of leaderstats to += 1

lucid sky
#

yall is a slanted list like this able to be scripted so its scrollable?

outer bridge
lucid sky
#

alr bro thats not an answer 😭

sour vine
outer bridge
#

so what does this do now

sour vine
mental hound
#

tiny bit of math tho

sour vine
#

hol up

#

u want it to add leaderstats value????????

outer bridge
sour vine
#

r u insane

outer bridge
#

yes

sour vine
#

u wasted my time

outer bridge
#

bruh idk what to do im stuck

sour vine
#

delete everything

outer bridge
#

well sorry that i wasted ur time but im just a bit stuck

outer bridge
#

then?

sour vine
#

shut up noob

outer bridge
#

bruh

sour vine
#

ur script is messed up

outer bridge
#

ok how fix

#

tutorial

#

pls

#

plsplspls

sour vine
#

hol up

#

what is even age

outer bridge
#

just pretend it is points

sour vine
#

so u want to make is so every 3 sec player gets +1 age and cash?

outer bridge
#

no

#

every time player gets 100 age then 1 cash

sour vine
outer bridge
#

they arent supposed to even win

sour vine
#

delete the second script

outer bridge
#

the one that fires remote event?

sour vine
#

yes

#

and remove while from the first script

outer bridge
#

ok

#

i already did

sour vine
#

like all the script

outer bridge
#

no.. lol

sour vine
#

ok bye

outer bridge
#

bye

sour vine
#

idk stay stuck forever

outer bridge
#

ok

#

im not deleting all the script

#

like its 100+ lines

sour vine
#

show all of it

plain dock
#

how do i move the background like in the loading screen, so lets say whatever is in the background can move diagonally

outer bridge
#

its too big

plain dock
#

how can i make the background u and v change, so like its moving diagonally

outer bridge
#

make it big and move it

#

idk what im saying btw

#

dont listen

outer bridge
plain dock
gritty prairie
#

guys can somebody help me so i wanted to recreate fall guys' memory fruit and everything was going great but suddenly i noticed red doesn't always appear. This is the module script where i think the problem is. the fact is that i did some debugging with print but i noticed that only in the first print red is there, then it disappears
Sorry for the video but the script was too long

outer bridge
#

why does my script not work

#

nobody is coding for free lil bro 💔

plain dock
#

how could i change the offset of the basketballs. its an image label with its ScaleType set to Tile.

#

how could i change the offset of the basketballs. its an image label with its ScaleType set to Tile. it doesnt have to be a image label but anyway to make an effect like this but change the offset

signal pewter
#

can someone help me im trying to upload ugc with a npc on it but each body part is it's own meshpart and im not able to use blender

lean heath
#

is anyone willing to help me out

#

i need help with understanding loop and while loops

sour vine
plain dock
lean heath
plain dock
sour vine
bleak glade
gritty prairie
bleak glade
#

i didnt feel like reading all your code but why do you need an array for colors

lean heath
#

can someone help me with understanding loops

#

there is a code i have that should makle snese but dosent

#

that should work and i dont understand

bleak glade
lean heath
#

local Slab = game.Workspace.Slab

for myCounter = 1,10,1 do
Slab.BrickColor =("CGA brown")
task.wait(1)
Slab.BrickColor =("Lime green")
Slab.BrickColor =("Really blue")
task.wait(1)
end

bleak glade
#

BrickColor.new

lean heath
#

where would i put that

bleak glade
#

after your =

lean heath
#

which one

#

all of them?

bleak glade
#

are we deaduzz

lean heath
#

im a new dev

bleak glade
#

Slab.BrickColor = BrickColor.new("CGA brown")

sonic kestrel
#

local partIsTouched = false

touchPart.Touched:Connect(function(otherPart)
    if partIsTouched == false then
        partIsTouched = true
        print(otherPart.Name)
        touchPart.Transparency = 0.5
        touchPart.CanCollide = false
        touchPart.Color = Color3.fromRGB(255, 255, 0)

        task.wait(2)
        partIsTouched = false
        touchPart.Transparency = 0
        touchPart.CanCollide = true
        touchPart.Color = Color3.fromRGB(265, 85, 255)
    end
end)``` why does my block turn blue. the colors are set to yellow and purple.
bleak glade
#

you have to actually tell it to make it a color

#

color = Color3.fromrgb(2,2,2) etc

lean heath
#

ok

#

ty man still learning tho!

lean heath
#

ty yoda

bleak glade
#

np

lean heath
#

one more question

bleak glade
sonic kestrel
#

ok

lean heath
#

for myCounter = 1, 10 ,1 do can u tell me which each one do i kinda forget

sonic kestrel
#

oh yeah I typed it wrong lol

bleak glade
lean heath
#

ty bro

gritty prairie
plain dock
#

its one image @sour vine

sour vine
tame sigil
#

Does anyone know how to reference the player in workspace

sonic kestrel
#

what is the difference between task.wait() and wait()

lone belfry
#

can u make a double jump script on server? or does it have to from client

sour vine
sour vine
lone belfry
#

which script type

stuck radish
#

character isn't a child of player

sour vine
stuck radish
#

it's a property

sour vine
#

it counts as a child tho

stuck radish
#

🤡

copper apex
hollow turtle
#
local Lighting = game:GetService("Lighting")
local timeSpeed = 12  -- Speed at which time progresses (1 sec IRL = 12 sec in-game)

game:GetService("RunService").Heartbeat:Connect(function(deltaTime)
    Lighting.ClockTime += (deltaTime * (timeSpeed / 3600))
    print("ClockTime:", Lighting.ClockTime)
end)

it will run for about 2 or 3 frames, then will get stuck at something like 23.0025 (x309)

tame sigil
hollow turtle
#

its heartbeat it doesnt need a whileloop

#

it runs every frame

severe cobalt
#

made some tweaks to my normal maps and the update time and gotta say the water looks pretty neat

still dunno what to do about my tiling issues yet, i might have to apply some kind of edge smoothing to the height map or something to get it to line up better.

lilac cosmos
#

can someone help

#

this script isnt working

copper apex
#

What part of it is not working

latent tapir
safe jolt
tame sigil
tame sigil
safe jolt
tame sigil
safe jolt
tame sigil
safe jolt
tame sigil
#

Yeah mb

safe jolt
#

nw

#

1 sec

#
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
#

use this

#

only works inside local scripts

#

since ur using "game.Players.LocalPlayer"

tame sigil
#

o

#

What if I use in normal script

safe jolt
#

then u have to get the player somehow

#
game.Players.PlayerAdded:Connect(function(Player)
    --you got the player here, now just get the character
end)
#

@tame sigil you can use chatgpt o3 mini for help, its really good for programming

tame sigil
#

oh ok ty

safe jolt
#

np

tame sigil
#

Also local player isnt a thing

#

In the script thing

safe jolt
safe jolt
#

and trying to get the localplayer

tame sigil
#

Do I put these in starter player scripts

safe jolt
#

which script are you using

safe jolt
#

or the other one

frozen charm
#

yo

#

whos selling any boxing/Fighting Or Horror Or cash grab genre game files lmk

tame sigil
safe jolt
tame sigil
#

alr

tame sigil
#

Or in player scripts

safe jolt
#

u can put it in player scripts, startergui, and some other places but i would place it in starterplayerscripts

tame sigil
#

It's not working

#

I mgiht be dumb but this is what I wrote

#
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()

local humanoid = character:WaitForChild("Humanoid")

game.Players.PlayerAdded:Connect(function()
    humanoid.WalkSpeed = 100
end)
safe jolt
#

remove the game.players.playeradded thingy

#

everything else looks fine

#

are you getting any errors

tame sigil
#

Oh dang lol

#

ty

tame sigil
#

What does the game.players.playeradded do

eager anchor
#

Guys I got a question I’m making climb the ladder simulator still looking for a coder but I’m not paying since im just recording a yt I have 80k subs what should I add to the lobby we’re still making the pets

tame sigil
#

Is it just for the player in Players

tame sigil
#

Levels

safe jolt
tame sigil
#

oh ok

#

ty

eager anchor
eager anchor
#

ok ok

#

Ty man

tame sigil
eager anchor
#

Now next step if find a coder

eager anchor
tame sigil
#

Oh I see

#

Cool!

eager anchor
#

Ty man

tame sigil
#

I see

tame sigil
rugged island
#

pretty good right?

#

3k visits

bleak glade
#

if its in starterpack i think you can

safe jolt
safe jolt
bleak glade
#

i have been coding for too long today

safe jolt
severe cobalt
# safe jolt are you using editablemesh for this?

yeah... the super high level overview of it is ->
start of game:

  • create mesh
  • init jonswap spectrum textures (for calculations)

every variable change ->

  • calculate jonswap spectrum

every update ->

  • Generate complex numbers based off of server time. Use that to calculate height, displacement, and normal maps.
  • Do an inverse fast fourier transform per map
  • Apply results to mesh

then todo is:

  • parallelize iFFT calls (working on)
  • parallelize the iFFT itself (down the line, still deciding if I want to do it based on stages or sub calculation)
  • add frame delays and interpolate iFFTs during delay phases (i JUST finished this, extremely hard to notice but lets me delay the frame times)
  • work on colors

then stretch is (if I can get enough performance out of the iFFT):

  • use 2 more iFFTs to calculate the jacobian to make detailed foam
  • better light interactions
severe cobalt
# safe jolt what is iFFT 😭

inverse fast fourier transform

fast fourier transforms converts a wave from frequency domain to time and back.

the most simple one is an audio visualizer. Those bars bouncing based off the input sound is the perfect example of an iFFT.

severe cobalt
#

but for ocean physics, all I care about is the inverse. Frequency -> time.

I essentially use whats called a spectrum to generate the ocean physics itself then convert it to a texture to draw on a mesh.

This is a single, tileable mesh that I then instance. Once its calculated, super cheap to copy/paste

#

I actually have some visualizations of some of the data, one sec

safe jolt
#

alright

tame sigil
safe jolt
severe cobalt
# safe jolt alright

! VOLUME warning on the spectrum video.. forgot I was listening to music when recording lol

Spectrum data is the red & green. If you look closely, you can sorta see the wave patterns

Then the video is all I got for the heightmap. Very first version, full of issues but it did something

safe jolt
severe cobalt
safe jolt
severe cobalt
tame sigil
#

Wait so the classic version of chat gpt is the one that helps with coding right

severe cobalt
#

like right here you can see creasing and i still cant figure out why

the heightmaps are like ever so slightly offset and its causing that issue

tame sigil
severe cobalt
rugged island
#

Still growing atm

#

only 1 ad ran

#

10 ad creds

safe jolt
rugged island
rugged island
severe cobalt
# safe jolt weird

my only hope is to take the heightmap and apply a very slight blur to slope out the triangles a bit more

safe jolt
rugged island
safe jolt
severe cobalt
#

tho tbh I might just slice off some of the vertices then slope it to the next set

severe cobalt
#

actually looking at it more, some of the triangles looks stretched. Maybe I just gotta calculate the average between the points... one sec

hexed blade
#

Still looking for help on this

safe jolt
#

doing data saving by yourself is kind of risky since there's a lot of things that can go wrong

#
hexed blade
#

Last time I used a module for a datastore it stopped working and when I tried to look for the fix everything just said to stop using it

safe jolt
#

what module did you use

hexed blade
#

I think I used Datastore 2

safe jolt
#

oh okay, ive never used that but ive used profilestore a LOT and its really good

#

ive never had any data issues with it

hexed blade
#

ohh

#

Hold on I'll check it out
theres a chance still need help on the way im trying to save data if the wiki doesn't say

safe jolt
#

sure thing

#

they have an example code here

woeful adder
#

do any of yall think a how to train your dragon game would be interesting

#

i feel like some of the stuff would be a pain to program

lofty plinth
#

could be

tame sigil
tame sigil
hexed blade
rugged island
severe cobalt
# safe jolt try, see if it works

yeah this is the closest I can get it to be invisible. At this point its just floating point precision issues, which I already put to 10^8 precision (just set it to a random high value)

I had to turn off normals bc they're not tiling correctly, which I have to fix now

woeful cosmos
#

how do i make a thing like this "a gamepass that gives you a apple that you can eat, it is a touch prompt" yk what i mean

#

you can eat forever

urban dawn
#

chatgpt it

steep sequoia
#

What's it like working in a team of scripters and other developers vs alone?

lost ether
#

hi

#

can someone help me out

plain dock
#

Can someone who knows how to code well dm me and lmk thoughts on something i made

#

Please

sudden python
#

Me

weary gazelle
#

does anyone know how to split a square into multiple different shaped parts ? Like glass ?

vague phoenix
#
local success, result = pcall(function()
    return 0 / 0
end)

print(success, result)```
surreal roost
#

3k or 2500

spark turret
surreal roost
#

im a french is english bro

latent hearth
novel steppe
#

hi!

silver verge
#

yo youre not finding someone here

sudden python
#

How much

stoic glacier
lost burrow
#

dont hire in chat

rugged trail
elder fulcrum
#

i need some genuine advice, I am currently lost and in need of something to code and I need a topic that is highly traversed by many large game developers and is highly needed for most games, like physics? where would I find information on writing code for customizable roblox physics that is credible and a good source of information?

vague phoenix
#
local function cursed()
    print("Infinite loop")
    return cursed()
end

cursed()  -- infinite loop??```

does this loops forever
elder fulcrum
#

no

drifting shell
#

Can someone help me fix a bug in my game for free please i new developer☹️☹️

cerulean osprey
#

how do i fix the __index repetition in watch, is it a problem like a memory leak or no, it even happens when i call the .new function one time

cinder oasis
outer bridge
#

three of these: `, then without a space put Lua then press enter, then paste your code, enter again, then the three symbols.

indigo pine
#

can anyone here help me scripting for guis like inventory and shop?

light thorn
#

looking for some help idk why it not working i can't see the image

rich spire
#

can someone help me

drifting shell
#

I am making a pass the bomb game and when tagger leaves it just breaks instead of a new one being picked i got a video

#

@somber vault

rich spire
#

CAN SOMEONE HELP ME WITH THIS BUG ITS DRIVING ME CRAZY

somber vault
#

as in when the tagger leaves the bomb gets like deleted

plain dock
#

The Yoo anyone here know alot about creating icons/thumbnails

drifting shell
#

Everything

somber vault
#

maybe do in code that when a player leaves, if that player is the tagger then give the bomb to someone else?

drifting shell
#

I am a new developer so

drifting shell
somber vault
#

Okay

vital creek
#

hey, is it possible to modify the source of modulescripts by script? I read that modulescripts are read-only

sour vine
twilit parcel
#

hello everyone, can someone help me figure why the :PointInside isnt working?

lament void
#

is there any module that can make server script communicate other server script like bindable event?

weary marlin
#

maybe use the good signal module

weary marlin
balmy plume
weary marlin
balmy plume
weary marlin
#

theres thousands of members here

modest stirrup
balmy plume
weary marlin
#

i didnt answer

#

bec i didnt know either

balmy plume
#

well i wanted him to know he wasnt alone in not knowing

twilit parcel
weary marlin
balmy plume
weary marlin
modest stirrup
granite galleon
balmy plume
weary marlin
twilit parcel
granite galleon
#

bruh

weary marlin
#

bruh

twilit parcel
#

any idea how i could check if the player pos is inside an object?

modest stirrup
outer bridge
#

how do i play the tweens?

modest stirrup
#

@twilit parcel you want the script in the chat or screenshot from roblox studio

modest stirrup
#

here in chat?

ornate bone
#

Who can advertise my Roblox group for Robux

modest stirrup
#

lol

#

hello again

outer bridge
#

guys i forgot how to play the tweens can someone help

twilit parcel
modest stirrup
#

alr gimme 5 minutes

weary marlin
modest stirrup
#

i have to try in roblox studios too

outer bridge
granite galleon
#

use TweenService instead because it has more customizability and functions

outer bridge
outer bridge
#

im only learning

twilit parcel
#

if its too inconvinience then could you just give me the idea?

outer bridge
#

im tryna do this without a youtube tutorial

#

like on my own

granite galleon
ornate bone
#

Who can advertise my Roblox group for Robux

modest stirrup
#

-- The part you want to check if the player is inside
local targetPart = workspace.Part -- Change this to the part you want to check

-- Function to check if the player is inside the target part
local function onPlayerTouch(part)
-- Check if the part touched by the player is a character's part
local character = part.Parent
if character:IsA("Model") and character:FindFirstChild("Humanoid") then
print(character.Name .. " has touched the part!")

    -- Optionally, you can add more logic to handle specific actions when a player is inside
end

end

-- Connect the function to the Touched event of the part
targetPart.Touched:Connect(onPlayerTouch)

#

the lines with the 2 -- are notes

granite galleon
#

please code block 🙏

outer bridge
granite galleon
#

ideally edit the message instead of flooding the chat by reposting it too

weary marlin
modest stirrup
#

why

#

froggo try it

outer bridge
twilit parcel
#

im trying to actively check if the player position is inside the object or not

modest stirrup
#

for whta you need that?

weary marlin
#

wait a sec

twilit parcel
#

i wanted to do so that whenever a player enters a new room, it does something

weary marlin
#

function isInsideBrick(position, brick)
local isinside = false
local overlapParams = OverlapParams.new()
overlapParams.FilterType = Enum.RaycastFilterType.Include
overlapParams.FilterDescendantsInstances = {brick}
for _, v in game:GetService("Workspace"):GetPartBoundsInBox(CFrame.new(position), Vector3.new(0.01,0.01,0.01), overlapParams) do
if v == brick then
isinside = true
end
end
return isinside
end

#

was a function from a code from mine

severe cobalt
outer bridge
dawn thistle
#

need help with cmdr - I want one argument to be able to accept 2 things. For example, the argument should be able to accept a player OR a string in the same argument, with autocomplete for player

weary marlin
severe cobalt
#

like one from a company under bethesda type of video game

outer bridge
granite galleon
severe cobalt
outer bridge
#

id say something is .... my ears but its inapropriatte for this channel

severe cobalt
granite galleon
#

if i remember correctly

outer bridge
twilit parcel
severe cobalt
twilit parcel
outer bridge
#

i enjoy juice wrld

severe cobalt
#

yeah so nine inch nails def isnt your type of music LOL

unreal roost
#

why is this pop up not enabling?

local CollectionService = game:GetService("CollectionService")
local player = game.Players.LocalPlayer

for _, barrel in ipairs(CollectionService:GetTagged("Barrels")) do
    local proximityPrompt = barrel:FindFirstChild("ProximityPrompt")

    if proximityPrompt then
        proximityPrompt.Triggered:Connect(function()
            local playerGui = player:WaitForChild("PlayerGui")
            local popUpGui = playerGui:WaitForChild("PopUpGui")
            if popUpGui then
                popUpGui.Enabled = true
            end
        end)
    end
end
granite galleon
unreal roost
#

my bad, wrong channel

granite galleon
#

so if it's outside of that range then it won't be equal, causing a result of false

twilit parcel
#

oh danm thats really cool lol

#

let me give it a try

weary marlin
#

i forgot that i had birthday in 3 days

granite galleon
severe cobalt
granite galleon
#

i checked the documentation for region3, it doesn't have anything of the sort

granite galleon
#

and it's proven to work well as i implemented it in a building game

#

now that i think about it, the check should even work against people trying to break it with NaN

tame dawn
#

Guys, does the value of NumberRange when created always permanent?

granite galleon
#

i saw that code block fail

severe cobalt
granite galleon
severe cobalt
#

you can at least filter the result

outer bridge
#

oops

#

failed again gods sake

granite galleon
#

vector checks can be pretty fast if you're just operating on data in the script environment

tame dawn
granite galleon
#

i heard the vector library is a bit faster than the Vector3 one too

outer bridge
#

guys will this tween script work in the picture

endEvent.OnClientEvent:Connect(function(won, roundstats)
end)

this part above works 100%, so dont ask if this function works, it does, and im just wondering if the tween i made will move the ui elements to the goal position

#

should work right?

severe cobalt
#

idk run the script

outer bridge
#

im gonna try now

#

YES IT WORKS

granite galleon
outer bridge
#

YESSSS

weary marlin
granite galleon
#

they seem to be treated as the same type but they still appear different

severe cobalt
granite galleon
#

in things that use luau

severe cobalt
#

does roblox support svg?

granite galleon
#

not sure

twilit parcel
#

is this correct?

severe cobalt
granite galleon
severe cobalt
#

out of curiousity, why roomPosition/2 instead of roomSize/2?

granite galleon
#

also one tip, you could have it just be return vector.clamp(playerPos, regionMin, regionMax) == playerPos since the compare results in a boolean

severe cobalt
#

^

granite galleon
#

quite possibly

severe cobalt
twilit parcel
outer bridge
#

how do i make a tween reverse? like is there a function or do i have to make a whole new tween

granite galleon
#

i believe you'd have to make a new tween

outer bridge
#

im too lazy but i guess if i have to

#

wait ill ask code help

severe cobalt
outer bridge
#

just found out i cant

severe cobalt
outer bridge
#

so im making a new tween

severe cobalt
#

Id say just have it play the new tween on tween.Complete

granite galleon
#

lol

severe cobalt
#

math.lerp my beloved

balmy plume
#

Your a boy in a mans world

#

And im a man

outer bridge
balmy plume
#

who loooooooves to play with boys

outer bridge
severe cobalt
#

they should change their font to one in the style of russian cursive

outer bridge
#

someone make this real

granite galleon
outer bridge
#

and downloadable

granite galleon
#

that might actually be useful for my game

#

because it has arrows which move along wires to indicate which direction the signal goes

#

and people complain about it lagging them every time it starts the tweens again when they have it rendering over 400 of them 😭

severe cobalt
#

math.lerp my beloved

believe there's even a lerp for vectors somewhere

granite galleon
granite galleon
#

ignore the fact i used coroutine.wrap instead of task.spawn

#

i was being rather religious about it for a while

severe cobalt
# granite galleon i was being rather religious about it for a while

but could do something like what im doing with my ocean. I have a slighty delay between map generation times bc the computation is complex. When I generate a new map, I store the current vertices then put the new vertices in an array. You can easily add some sort of smoothing too.

Doing like this you can update the direction every frame with as much performance impact as dust from a cheeto

#

my lerp factor is a count between last generation frame and current actual frame, but I could easily interrupt it without messing with the lerp.

static coral
# granite galleon

you can use task.desynchronize under an actor too if u still need performance

severe cobalt
granite galleon
#

the performance draw is coming from things that can't be ran in parallel

static coral
severe cobalt
granite galleon
#

i also realized one of the main inefficiencies of this which i could easily fix

static coral
#

oo

granite galleon
#

this is bad

#

absolutely horrible

#

god knows why i made it do this

#

that's definitely why it runs so slow

balmy plume
granite galleon
#

calling :GetPivot() on several hundred models at once takes A LOT of time

#

i should've just made it cache that cframe after the line is generated

severe cobalt
# static coral oo

rn im working on a lazy scheduler for my iFFT algorithm so I can spread the work out to multiple frames. This will enable me to calculate multiple cascades with displacement, normals, and jacobian foam then stitch them together. The worse the cpu is, the more I can delay the frames and the lerping will make it hard to notice. First version should run around 150fps despite adjusting 64^2 vertices and using a glorified complex number multiplication with the complexity of N*log2(N)

When I get parallel to be smarter scheduled, I should reach 240fps

severe cobalt
static coral
balmy plume
#

And it does summ

#

Which results in summ

static coral
#

yeah i think so

severe cobalt
#

but its gonna look soooo good once I properly implement lighting and foam.

twilit parcel
#

huh question pls, why is there this code giving a inconsistant result?

local roomPlacement = {}
local getRoom = game.Workspace:WaitForChild("Rooms")

for i, room in ipairs(getRoom:GetChildren()) do
    if room:IsA("BasePart") then
        roomPlacement[i] = room
        print(i,room)
    else
        continue
    end
    
end
granite galleon
#

more importantly, why did you put an else branch with just continue in it

severe cobalt
twilit parcel
granite galleon
severe cobalt
granite galleon
#

i paid the price of trusting the order of :GetChildren() for a while

twilit parcel
#

:GetChildren() is hella weird sometime

granite galleon
#

because roblox did an invisible change that resulted in it randomizing the order of properties in my game's configuration tool

#

but i somehow magically fixed it

severe cobalt
# twilit parcel :GetChildren() is hella weird sometime

"i" just represents a pointer. A pointer points somewhere. In this case, the pointer points to where to find your room in the RAM.. so order shouldn't matter if what you're using it for is something like ->

local example = getRoomsTouchingPlayer()
for i, v in example do
    doSomethingWithRoom(v)
end```
indigo pine
#

anyone here can help me? scripting guis like inventory or shop.

somber vault
#

Any scripters wanna make a pvp game?

#

is there any scripter that might be available and wint ghost me

#

i need a small commision

hoary crater
#

discuses

urban dawn
brave viper
#

Anyone got experience making a syncing animations on a player if a player change dances it automatically syncd

indigo pine
somber vault
#

guys can anyone dm me i need help with a script

severe cobalt
# brave viper Anyone got experience making a syncing animations on a player if a player change...

sync to server time

local precision = 100
local trackOffsetPercentage = (workspace:GetServerTimeNow() % precision) / precision

This puts the value in a range of 0 to .99. ServerTime % precision caps it at 0 to 99. If ServerTime hits 100, it goes back to 0. Divide it by same clamp to make it a decimal.


Use TimePosition on animation track. https://create.roblox.com/docs/reference/engine/classes/AnimationTrack#TimePosition

set it to track.Length * trackOffsetPercentage
This essentially makes a progress bar.

then play the animation.

*note unless you have the animations very strictly client side, there could be slight desync in the animations themselves. Tho by having it strictly client side, you have to have the client handle animations for other players too. This can be easily handled through a remote event that fires to all clients like remoteEvent:FireAllClients(targetCharacter, animation) then just handling the animation inside of remoteEvent:OnClientEvent

brave viper
severe cobalt
lone trail
#

any good resources for scripting decent car systems?

somber vault
#

guys can anyone dm me i need help with creating a script

severe cobalt
# brave viper

both players are using a different dance from what it appears

in this case, you have to add additional logic.

When a player starts playing an animation, store the animationId in a table. Ex:
currentDance[Character.Name] = animationId
When the player does something to stop dancing, remove the entry.
currentDance[Character.Name] = nil

When the player presses the sync button, get the dance that player is currently doing through currentDance[playerName] then play it with the time settings mentioned earlier

if currentDance[playerName] is nil, the player isnt dancing

#

Have the table be initialized at the start of the script as well, rather than inside the function. Do this client side to make it sync better

brave viper
#

okay

viscid marsh
#

yo chat so i been tryna learn scripting i understand a few stuff and forgot some stuff what should i do

mortal kettle
#

Should profilestores be kept in serverscriptservice?

somber vault
#

You wouldnt want exploiters messing with your data, would you?

static coral
#

anyone here made a scripting portfolio on carrd? im looking for ideas on how i can make the layout of my own

marble pecan
#

how do i add a vfx i made attached to a part to my teleportation script

#

im at a loss

solemn echo
#

Obby with a twist ideas?

static coral
twilit parcel
#

hello everyone, question pls, im using camera:GetPartsObuscuringTarget(...,...) right now and wanted to hide objects that are inside the array while also display the objects that are not in the array

twilit parcel
#

how can i achive the ladder?

#

i know how to hide the objects but not sure how to display it again

static coral
#

depends on how you hid them

twilit parcel
#

im planning to just set the transparency to 1

static coral
#

then maybe put them in array inside of another table that also contains a key that saves their original transparency value

twilit parcel
#

uhhh perhaps i should continue this tmr

#

its like 1:30am for me atm

junior ibex
#

Anyone here that can slide me 1k if your rich 😭🙏

proud beacon
#

how do i ignore the mobile joystick when scripting a gun, when i move it shoots there.

river anvil
hearty sun
#

could someone help me with something in a roblox script

#

when someone tries to walk over a part to get a vest, they cannot get 2 different vests and im trying to change that but i dont know what im looking at

#

what part is stopping them from getting a second vest

hearty sun
#

what part do i change

#

@balmy plume

balmy plume
#

removei t

hearty sun
#

completely?

balmy plume
#

ye

hearty sun
#

is this correct

balmy plume
#

try it

rough girder
#

Players going to get 50 vests now

balmy plume
#

type shito

hearty sun
vale sable
rough girder
#

Is this a good way to structure story code?

stable urchin
#

I'd consider creating individual modules

#

one containing the objective display text lookup, and then one for each story action (if they get bulky enough at one point)

rough girder
#

Thank you for the feedback. I suppose I'll continue like this until it gets too verbose before refactoring

rain vigil
#

test

scenic hemlock
#

Someone here codes simulator and modular? Im looking to hire dm me

weary marlin
scenic hemlock
inland bay
#

and you need the full game scripted?

scenic hemlock
#

No just a mechanic

inland bay
#

hm

#

describe it

scenic hemlock
#

Dm me

vague chasm
#

make a post instead

scenic hemlock
#

It doesn’t let me

vague chasm
scenic hemlock
#

Just bc im new to discord bruh

vague chasm
#

you cant hire people out of the marketplace

split kayak
#

how would i make a unragdoll script with this ragdoll script

script.Parent.Activated:Connect(function()
    local _holder_character = script.Parent:FindFirstAncestorOfClass("Model")
    _humanoid = _holder_character:FindFirstChildOfClass("Humanoid")
    script.Parent.Activated:Connect(function()
        local _holder_character = script.Parent:FindFirstAncestorOfClass('Model')
        _humanoid = _holder_character:FindFirstChildOfClass('Humanoid')
            local humanoid = _humanoid.Parent:FindFirstChild('Humanoid')
            if humanoid then
                for index, joint in pairs(_humanoid.Parent:GetDescendants()) do
                    if joint:IsA('Motor6D') then
                        local socket = Instance.new('BallSocketConstraint')
                        local a1 = Instance.new('Attachment')
                        local a2 = Instance.new('Attachment')
                        a1.Parent = joint.Part0
                        a2.Parent = joint.Part1
                        socket.Parent = joint.Parent
                        socket.Attachment0 = a1
                        socket.Attachment1 = a2
                        a1.CFrame = joint.C0
                        a2.CFrame = joint.C1
                        socket.LimitsEnabled = true
                        socket.TwistLimitsEnabled = true
                        joint:Destroy()
                        humanoid.EvaluateStateMachine = false
                        humanoid.Parent:FindFirstChild('Left Leg').CanCollide = true
                        humanoid.Parent:FindFirstChild('Right Leg').CanCollide = true
                    humanoid.Parent:FindFirstChild('Left Arm').CanCollide = true
                    humanoid.Parent:FindFirstChild('Right Arm').CanCollide = true
                        
                        
                        
                    end
                end
            end
    end)
scenic hemlock
#

I can’t post

vague chasm
latent gust
somber vault
#

yo has anyone here every made a unboxing system

latent gust
#

yes

somber vault
# latent gust yes

qucik question do you use the actual names of the items to define them or do u use something else

#

im not a scripter but im tryna find the best way to define my items to avoid duping and exploiting

#

cuz my scripter is asking how i want it

sonic kestrel
#
part.Name = "part"
part.Parent = workspace
part.Touched:Connect(function(otherPart)
    print("Touched!")
end()) ``` I know that this is wrong, but what is happening step by step? Does the function call pass in a nil value?
#

I understand what I need to do to fix it though. just curious.

split kayak
#

omg

#

how did i not think of that

sonic kestrel
#

nvmd ChatGPT is my savior

latent geyser
#

guys how do libraries works?

#

idk so much

#

or

#

nvm

#

i can search it

shrewd cobalt
#

Can anyone help me make a command script for studio? I want it to change all surface appearences with the same colour value to another one.

north marsh
#

how you guys would block this exploiting bypass?

char = workspace.Xestlers char.Parent = nil char.Humanoid.Name = "2" char["2"].WalkSpeed = 430 char["2"].HipHeight = 1 char.Parent = workspace

silk tartan
#

Reinstall roblox

hard mulch
#

i need 240 rbx, anyone have any small task they need me to complete?

slender salmon
#

is it possible to check who a player is following on roblox cause I read a few dev forums and all are outdated

carmine yacht
#

but i was thinking a ready system instead

carmine yacht
#

where 1 player starts dancing, the dance stops at X keyframe when synced, and then resumes when all players are readyt

hard mulch
uncut helm
#

huge issue guys how do i print "hello world"

carmine yacht
hollow turtle
#

LF Teammates for #1338148716418171052

requirements:
Amateur scripting abilities
Classic roblox building style

DM ME!

uncut helm
carmine yacht
#

Sir yes sir.

hollow turtle
#

@uncut helm I gotchu

#
-- Create a module for printing text
local Printer = {}
Printer.__index = Printer

function Printer.new()
    local self = setmetatable({}, Printer)
    self.messageQueue = {}
    return self
end

function Printer:addMessage(message)
    table.insert(self.messageQueue, message)
end

function Printer:printMessages()
    for _, message in ipairs(self.messageQueue) do
        self:processMessage(message)
    end
end

function Printer:processMessage(message)
    local processedMessage = ""
    for i = 1, #message do
        processedMessage = processedMessage .. string.sub(message, i, i)
        wait(0.05) -- Simulating processing delay
    end
    print(processedMessage)
end

-- Encode the message using an unnecessary function
local function encodeMessage(message)
    local encoded = ""
    for i = 1, #message do
        encoded = encoded .. string.char(string.byte(message, i))
    end
    return encoded
end

-- Create a printer instance
local myPrinter = Printer.new()

-- Add the encoded "Hello World!" message
myPrinter:addMessage(encodeMessage("Hello World!"))

-- Print the messages in the queue
myPrinter:printMessages()

modular script for printing messages

uncut helm
hollow turtle
#

as long as you don't mess anything up

#

it can print anything you want

uncut helm
#

I see, thank you for your help in assisting me in printing the phrase "Hello World!" on the hit game engine Roblox Studio, I shall forever remember this as I explore the game engine and make my own games.

idle oxide
#

I wanna double check something, when I need animations to match on 2 players, does it then move to be handled on the server?

#

or do I make events fire to the two players

median fable
#

local mainmenu = script.Parent
local Menu = mainmenu.Menu
local Play = mainmenu.PLAY
local SHOP = mainmenu.SHOP
local setting = mainmenu.SETTINGS
local Leaderboard = mainmenu.LEADERBOARD

local function OpenShop()
Menu.Visible = false
SHOP.Visible = true
end
local function OpenSettings()
Menu.Visible = false
setting.Visible = true
end
local function OpenLeaderboard()
Menu.Visible = false
Leaderboard.Visible = true
end
while wait() do
SHOP.MouseButton1Click:Connect(OpenShop)
setting.MouseButton1Click:Connect(OpenSettings)
Leaderboard.MouseButton1Click:Connect(OpenLeaderboard)
Play.MouseButton1Click:Connect(OpenPlay)
end

spice nymph
median fable
#

how so?

spice nymph
#

you put mainmenu.PLAY

#

you mainmanu is your screen gui

#

you supposed to do Menu.PLAY

#

and your while statement is pretty bad too

#

you can just remove the while loop

#

its not neccessary

hexed shoal
#

i wanna get into roblox studio game coding, any1 got any ideas of stuff i should look at

spice nymph
#

Also try making small projects here and there

hexed shoal
#

Thank you!

cinder nova
#

Is there any way we could make some type of global jumpscare that would jumpscare all servers

mystic yew
#

It allows global server communication u can just send a signal (publish a message) and have all servers listen for it and when it receives fire a remote to all client to play the jumpscare

cinder nova
#

thank you ill look at it

mystic yew
#

Np

patent sonnet
#

does anyone know a good and fast plugin for applying motor6d to models

somber vault
#

Is There Any Staff Available?

rustic torrent
#

Looking for someone with a decent pc who would be willing to help with a project.

karmic wind
hollow turtle
#

depends how good you are

vestal zenith
#

ok

hollow comet
#

would it be better to use body velocity or linear velocity to move the player for a slide/roll or setting the rootPart cframe?

karmic wadi
#

1.2K USD is a fair price for a complex framework?

void stone
#

I NEED HELP ASAP for some reason camera and player is like shaking when i walk in studio please help asap ill send crypto

#

please help

hard mulch
fluid thicket
#

I’m new to scripting and I was trying to make a rig follow waypoints and an error happened does anyone know how to fix it?

fluid thicket
prime oar
#

I need help, whenever i press the image button it closes the main gui does anyone know how to fix? Dm for more context / explanation

bronze solar
#

If i am trying to create a concept where one player can freeze another player. And once you freeze the player they become an iceblock. Is it possible in roblox studio to make it so you can push the other player around in the ice block and make them slide around?

boreal wyvern
dapper grotto
#

Why is there more helping here than in code help

loud zenith
#

does anyone know if its worth using switching to use ByteNet

#

and is it only for replacing remote events and remote functions?

rustic torrent
#

Hey if anyone here plays emergency response liberty county and wants to be staff in a big server dm me.

lucid sky
#

yall, if a map has three rooms, and theres a script that basically hides the rooms the player isnt in and changes it upon the player changing rooms, will that be possible? if so will it improve performance?

lofty plinth
#

Technically yes but it depends on the rooms itself for how worth it is

lyric hull
#

I just randomly got this but me and you are on the same level rn keep working

south spruce
urban meadow
#

yo how can i test my anticheat

#

idk how to test if it works

bleak glade
urban meadow
#

and moniters replicated storage

#

and watches memory spikes

spark swallow
#
game.Teams:FindFirstChild(Team1):Destroy()
game.Teams:FindFirstChild(Team2):Destroy()```

how can i destroy a team
team1 is a team instance and it still cant destroy it
thorny parcel
#

i forgot proximity prompt service existed lol

hoary tundra
#

Theoretically wouldn’t it be possible to add an 2d animation system into Roblox?

river mirage
#

does anybody know why whenever I click the button that’s suppose to show the game pass prompt it doesn’t? I have no errors

leaden zealot
#

^

oblique musk
#

Hello, could someone tell me what these errors with the scripts below mean?

#

Obviously the ones in red

weak ravine
#

whats an easy way to advertize a game

spiral jungle
halcyon moon
#
local Terrain = workspace.Terrain

local Colors = {
    [0.8] = Enum.Material.Snow, -- Mountain Crests
    [0.75] = Enum.Material.Basalt, -- Dark Rock
    [0.7] = Enum.Material.Rock, -- Rock -- Dark Grass
    [0.3] = Enum.Material.Grass, -- Grass
    [0] = Enum.Material.Water, -- Deep Ocean
}

function createcube(region, material)
    if typeof(region) == "Region3" and typeof(material) == "EnumItem" and material.EnumType == Enum.Material then
        Terrain:FillRegion(region, 4, material)
    else
        warn("Invalid parameters: Region3 expected but got " .. typeof(region))
    end
end

function GeneratePerlin(mapSize, frequency, scale, amplitude, seed)
    local random = seed and tonumber(seed) and Random.new(seed) or Random.new()

    for x = 0, mapSize * 10, 10 do
        for z = 0, mapSize * 10, 10 do
            local xOffset = random:NextNumber(-100000, 100000)
            local zOffset = random:NextNumber(-100000, 100000)

            local sampleX = x / scale * frequency + xOffset
            local sampleZ = z / scale * frequency + zOffset
            local baseY = math.clamp((math.noise(sampleX, sampleZ) + 0.5), 0, 1)
            local y = baseY * amplitude

            local material = GetMaterial(baseY)
            local region = Region3.new(Vector3.new(x, y, z), Vector3.new(x + 10, y + 10, z + 10))

            createcube(region, material)
        end
        task.wait()
    end
end

function GetMaterial(y)
    local bestKey = 0
    for key in pairs(Colors) do
        if y >= key and key > bestKey then
            bestKey = key
        end
    end
    return Colors[bestKey] or Enum.Material.Grass
end

GeneratePerlin(100, 0.4, 10, 15)
                                                                          

How to add resolution to the terrain rn it looks kinda dogshi

#

nvm ima have to use WriteVoxels

lilac hill
#

Does anyone know how to outdent all of this code :( i accidently indented while i was coding and didn't realize until it was far too late

halcyon moon
#

select it and press tab

#

it doesn't replace

#

it just adds a thing

spiral jungle
lilac hill
lilac hill
#

ik, please do not judge

bleak glade
#

you don’t need to wait for child on everything too

lilac hill
#

oh right

queen kelp
#

print("Hello, World!") not working

#

pls help

hallow meteor
#

if anyone's familiar with planeConstraints, if I want to use physics movers to change the Y position, is anyone familiar with using LinearVelocity to do so? I've been experimenting with this for the past half hour and no results so far

hallow meteor
queen kelp
#

"code not work :("

hallow meteor
#

im doubtful, can you send a screenshot of your output

severe cobalt
#

me when I put a script in storage

queen kelp
lilac hill
#

least funniest joke:

silver verge
silver verge
somber vault
#

Anyone wanna give me a project idea? (Scripter not that good doe)

silver verge
#

FindFirstChild expects a string for a name, and isn't guaranteed to return an instance if something of that name isn't a child

rotund lichen
#

Does anyone can script but just for 500 - 1000 robux and just TD game? Like just add some stuff

rotund lichen
#

But if some errors I can ask here?

hallow meteor
twilit parcel
#

sure lol its a learning chat afterall

rotund lichen
#

Ohh okay

#

Btw can I ask like how to activate a button?

#

The mouseclick and touchtap?

dusky relic
hallow meteor
twilit parcel
#

This should provide with what you're looking for

silver verge
rotund lichen
#

like if MouseButtonClick or TouchTap then?

#

or like if Activated then?

#

ohh yeah its activated

#

like if Button.Activated() then?

spiral jungle
#

Not a real person

main hare
#

does PreloadAsync only work on the server

rotund lichen
#

is this ok it will work i will try it

#

guys how to like to clone ui's?

somber vault
#

if you want it to be a button that isnt like on/off then you can use click detector and do .mouseclick: connect(function()

rotund lichen
#

ohh ok

#

its working

#

can close it too

#

but idk how to clone

somber vault
#

clone uis?

rotund lichen
#

yeah

#

learning here is so fast!

somber vault
#

maybe do ui = game.startergui.yourUi
ui1 = ui:Clone?

latent fox
somber vault
somber vault
rotund lichen
somber vault
#

in any script rly

rotund lichen
#

can i ask like how to control how many and like change name?

somber vault
rotund lichen
#

wait i know it

somber vault
#

and do .Text or .Name

rotund lichen
#

then?

scenic gate
#

To any scripters pro or beginners
When you see a explorer very unorganised you can still work on the game or you need it to be to organised ?

scenic gate
rotund lichen
#

hello? how to correct this and loop the timer?

#

will i use while true do?

scenic gate
#

so first, put the task.wait(1) on while task.wait(1) do

just make the line 8 "while task.wait(1) do"

#

remove the line 9, because you're resetting the timer every seconds

#

and put the condition (14 to 26) in the while loop

#

@rotund lichen

rotund lichen
#

ohh ok

scenic gate
#

i mean i hope it's the right thing you want

rotund lichen
#

huh what do you mean while loop?

scenic gate
rotund lichen
#

like that?

tardy pasture
# rotund lichen

if u want the script to wait 3 seconds before running just write in the begin off ur scrip task.wait(3)

#

and it will never run the if statment as it is of rn

rotund lichen
#

wdym?

#

ohh ok

#

not working 😢

#

im just bigginer sorry

#

finaly

umbral carbon
#

The bread ain't even enough

#

I need a cheeseburger

hardy pilot
rotund lichen
#

Hater

random comet
#

who has experience making mining games

gloomy kraken
random comet
#

do you know how to make a virtual depth system

hardy pilot
#

💔

hardy pilot
#

Virtual depth doesnt mean anything in general

molten creek
#

It's depth that's virtual

#

Isn't that obvious

hardy pilot
#

Ofc

#

Like vr yk

molten creek
#

yeah

#

factual

#

every now and then i join this discord to see if any scripters are still good

#

and i've come to the conclusion no

hardy pilot
molten creek
#

but you won't work for me so it's less acceptable

hardy pilot
supple spindle
#

is controller support bugged?
it seems like its not connecting any of the gamepads, im using the controller emulator to test but with real controllers this doesnt work either
its not picking up any input

worldly heron
#

I need to make sure im not going crazy but, Is this a valid way to create custom buffer objects?

#

please 🙏 explain why

indigo pine
#

can anyone here can help me for scripting guis like inventory and shop?

indigo pine
#

can anyone here can help me for scripting guis like inventory and shop

twilit parcel
#

question pls, why doesnt the proximity promt show up when i stand near my bed?

hollow turtle
sour vine
#

ur character only is

#

make the maxrange like 100 or something

twilit parcel
#

i made it 10000 and it still didnt work

sour vine
coral oyster
#

is there a way to send a frame created by client to server

sour vine
#

in the prompt proprieties

twilit parcel
#

ohhh got it

#

i had an invisible wall blocking the ray lol

#

ill turn that propriety off then

#

thanks @sour vine

orchid wasp
#

how much should i pay someone to make a roblox greedy noobs kit /withraw and donate system?

orchid wasp
#

k

plush jungle
#

Idk though

orchid wasp
#

same but think yotubers might drop it

hardy pilot
indigo herald
#

browies im trying to make a cat spawn at the position of the parent but it doesnt work. there anythin wrong?

proper walrus
#

does anyone know how to use smartbone module?

slow inlet
#

make a variable for the cloned cat and parent and then position it

somber vault
#

you are trying to move the replicatedstorage cat, not its clone

frozen swift
#

Put the cat in serverstorage

indigo herald
somber vault
#

you gotta move the clone variable

frozen swift
#

Then use a local inside the function like this
local cat = game.ServerStorage.cat:clone()

somber vault
#

it is not related to its position in replicatedstorage or smth

indigo herald
#

ahhhhh thx i got it

frozen swift
#

Move the cat to serverstorage

tardy pasture
#

run it on the server the client cant spawn stuff in the workspace i believe

dense wharf
#

print("run doom")

frozen swift
#

Also for cld you can change it from
local cld = script.Parent:WaitForChild("ClickDetector")
To
local cld = Part:WaitForChild("ClickDetector")

dense wharf
#

it avoids confusion

frozen swift
#

Oh ye mb

#

This section is more helpful than #code-help for now

somber vault
#

The people in there are harsh but it is the way to learn

frozen swift
#

Oh

somber vault
#

you have to endure it

frozen swift
#

Whats the difference between here and there

somber vault
#

there are more experienced ppl there

tardy pasture
#

yes endure the pain

somber vault
tardy pasture
#

nooo

#

its where we argue

#

about how a variable should be called

somber vault
#

anyway code help is definitely better in terms of finding ppl that can help you

frozen swift
#

Alr

tardy pasture
#

u like it hard huh ?

somber vault
#

Please dont take it out of context, thanks

frozen swift
tardy pasture
#

ur the one giving off hints

sour vine
#

people who use task.wait instead of wait() and [] instead of . r going to hell

tardy pasture
#

nah

#

i use repeat untill

#

😉

frozen swift
#

Thats a thing?

valid bough
#

hey im new to coding how to disable this dum dum stupid box pls help

twilit parcel
#

anyonw knows why my code is returning this?

jovial ice
#

i usually get that when a script runs before whatever it needs hasnt loaded or i misspelt something

jovial ice
# twilit parcel

also wasnt there an easier way to get that duck object? think it was some function like getchildren or something

twilit parcel
#

nope i tried this in a new roblox studio and it works quiet well

#

this is the first time i encountered an error revolving "master control"

jovial ice
twilit parcel
#

hmm i dont think its the duck that is the problem

#

im not sure how am i going to fix this tbh

#

it said here that the problem lies on this code

#
local camera = game.Players.LocalPlayer.PlayerScripts:WaitForChild("Camera")
local function onCharacterAdded(character)
    local player = game:GetService("Players").LocalPlayer -- This is how you could get the player here
    camera.Enabled = true
    local humanoid = character:WaitForChild("Humanoid", 5)
    if not humanoid then
        return
    end

    humanoid.Died:Connect(function()
        camera.Enabled = false
    end)
end

game:GetService("Players").LocalPlayer.CharacterAdded:Connect(onCharacterAdded)
do 
    
    local alreadyExistingCharacter = game:GetService("Players").LocalPlayer.Character
    if alreadyExistingCharacter then
        onCharacterAdded(alreadyExistingCharacter )
    end
end
#

This is so bizzare