#code-discussion

1 messages · Page 69 of 1

somber vault
#

also use this server alot

ember otter
#

How much do you earn per comm?

somber vault
weak radish
somber vault
#

i dont do commisions bcz i dont have a portfolio

ember otter
#

Alright how much do y'all earn on average?

weak radish
#

Ive done it once

somber vault
#

i make good frameworks and systems but then i scrap projects

ember otter
#

Answer this last question

weak radish
ember otter
#

How much do y'all earn on average

somber vault
#

you earn by making games

weak radish
somber vault
#

cooms are for possios

weak radish
somber vault
weak radish
#

Am I cooked for doing a 300rbx comm

somber vault
#

not cooms

somber vault
weak radish
somber vault
#

oh

#

in that case then idk

weak radish
#

farely easy

#

My favourite thing to do in my spare time is making scripts with 5 different variables all with the same values because I cant be bothered to remember the names of them

#

As you can imagine my scripts look beautiful

somber vault
#

fr

weak radish
#

Only cus i was tired and it was a personal project

#

but thats all the same script

keen hollow
#

Why is it every time I do a tutorial sword m1 is a tool I just want m1 like in games how do I do this

chilly canyon
upbeat jungle
#

My game deals with alot of NPCS walking around, how do i prevent lag while keeping alot of them?

lusty barn
#

humanoids are intensive

#

make your own handler

#

and don't use a script in each, use ECS or OOP

raven dust
#

@shut sorrel hello bro i need ur help

#

i made a zombie ai but when they get close enough to players (if players moving too) they never get to touch em, they start stuttering n be laggy ionnow

limpid crown
#

Can someone explain this to me I don't understand it I am watching a tutorial how to learn lua. (This is not mines)

vale cedar
#

what about it

limpid crown
vale cedar
#

who else

limpid crown
#

oh

#

well i dont under stand the 5000 < 10000

#

i dont rlly know how to explain it

raven dust
static coral
limpid crown
#

oh i found it out

shy basin
#

somewhere in this script is an error with the function LoadProfileAsync, anyone know how to fix ?

rough burrow
#

does anyone know how to play a sound right as soon as a player leaves?

shut sorrel
pulsar acorn
#

how can i check the performance of my game

static coral
raven dust
#

ive been trying everything for whole day none of em worked

shut sorrel
raven dust
#

idk

#

thats the code

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")

local AIController = {}
local zombies = {}

local DETECTION_RANGE = 70
local RUN_DELAY = 4
local WALK_SPEED = 7.5
local RUN_SPEED = 30

-- each zombie will register like: AIController.Register(zombie)
function AIController.Register(zombie)
    local humanoid = zombie:FindFirstChildOfClass("Humanoid")
    local root = zombie:FindFirstChild("HumanoidRootPart")
    if not humanoid or not root then return end

    table.insert(zombies, {
        model = zombie,
        humanoid = humanoid,
        root = root,
        target = nil,
        chasing = false,
        running = false,
        chaseStart = 0,
    })
end

-- main update loop
RunService.Heartbeat:Connect(function(dt)
    local playerList = Players:GetPlayers()

    for i, zombie in ipairs(zombies) do
        local zRoot = zombie.root
        local zHum = zombie.humanoid

        -- validate
        if not zRoot or not zHum or zHum.Health <= 0 then continue end

        -- already chasing someone
        if zombie.chasing and zombie.target and zombie.target:FindFirstChild("HumanoidRootPart") then
            local tRoot = zombie.target.HumanoidRootPart
            local dist = (tRoot.Position - zRoot.Position).Magnitude

            -- stop if too far
            if dist > DETECTION_RANGE * 1.5 then
                zombie.chasing = false
                zombie.running = false
                zombie.target = nil
                zHum.WalkSpeed = 0
            else
                -- run after 4 secs
                if not zombie.running and tick() - zombie.chaseStart >= RUN_DELAY then
                    zombie.running = true
                    zHum.WalkSpeed = RUN_SPEED
                end
                -- move toward target
                if tick() % 0.25 < dt then
                    zHum:MoveTo(tRoot.Position)
                end
            end
        else
            -- detect nearest player
            local closest, minDist = nil, DETECTION_RANGE
            for _, player in ipairs(playerList) do
                local char = player.Character
                if char and char:FindFirstChild("HumanoidRootPart") then
                    local dist = (char.HumanoidRootPart.Position - zRoot.Position).Magnitude
                    if dist < minDist then
                        closest = char
                        minDist = dist
                    end
                end
            end

            if closest then
                zombie.target = closest
                zombie.chasing = true
                zombie.running = false
                zombie.chaseStart = tick()
                zHum.WalkSpeed = WALK_SPEED
            end
        end
    end
end)

return AIController 
shut sorrel
raven dust
shut sorrel
#

Yeah remove that if statement just leave the moveto

raven dust
#

lemme send a clip

shut sorrel
chilly canyon
shut sorrel
#

I think it's setting running to false so it goes back to walking then still detects player and starts running over and over again in a loop

raven dust
shut sorrel
raven dust
shut sorrel
raven dust
shut sorrel
raven dust
#
local hrp = script.Parent:WaitForChild("HumanoidRootPart")

-- replace these with your actual animation ids
local idleAnimId = "rbxassetid://78236964138242"
local walkAnimId = "rbxassetid://180426354"
local runAnimId = "rbxassetid://110375194022731"

local animator = humanoid:WaitForChild("Animator")

local idle = Instance.new("Animation")
idle.AnimationId = idleAnimId
local idleTrack = animator:LoadAnimation(idle)

local walk = Instance.new("Animation")
walk.AnimationId = walkAnimId
local walkTrack = animator:LoadAnimation(walk)

local run = Instance.new("Animation")
run.AnimationId = runAnimId
local runTrack = animator:LoadAnimation(run)

local currentTrack = nil

local function playTrack(track)
    if currentTrack == track then return end
    if currentTrack then
        currentTrack:Stop()
    end
    currentTrack = track
    currentTrack:Play()
end

-- adjust speed thresholds if needed
local WALK_THRESHOLD = 0.1
local RUN_THRESHOLD = 8

game:GetService("RunService").Heartbeat:Connect(function()
    local speed = hrp.Velocity.Magnitude

    if speed < WALK_THRESHOLD then
        playTrack(idleTrack)
    elseif speed < RUN_THRESHOLD then
        playTrack(walkTrack)
    else
        playTrack(runTrack)
    end
end)

local AIController = require(game.ServerScriptService:WaitForChild("AIController"))
AIController.Register(script.Parent)


this is the script in zombie model

shut sorrel
#

Your script just isn't updating fast enough I think, it could be from uncessary computations or maybe since your calling another heartbeat from a module and have that one handling animations too

raven dust
#

it seems its not cause of having 2 heartbeats i changed anim script to smth else its still same

left apex
#

Anyone here do small/medium scripting comms?

raven dust
#

i also tried setting network ownership of zombie to server it was still same

karmic ether
hasty stirrup
#

can someone help me with scripting

left apex
vocal wren
#

anybody wanna mak a roblox game like bloxburg, no hiring, just creating it for fun :) (dm me)

shut sorrel
hasty stirrup
#

can someone help me with scripting

shy basin
karmic ether
shy basin
#

tysm

raven dust
blissful aspen
left apex
#

Anyone here do small/medium scripting comms? Need a system done for dropping dominos

left apex
karmic ether
# shy basin tysm

Fehler kommt, wenn active_session den Wert nil hat, was dazu fĂŒhrt, dass der Code in eine Endlosschleife gerĂ€t, statt das Profil zu erstellen

shy basin
#

that means ?

#

and why the sudden denglish ? lol

#

how to fix the error ?

left apex
#

@blissful aspen are u able to make a system for that?

karmic ether
blissful aspen
shy basin
#

ok hopefully it works

karmic ether
left apex
shy basin
shy basin
#

this is the line it shows when i click on the error if that helps

old basin
#

i need help making a script that gives a player a role named "FreeAdmin" when they click on a part using hd admin

#

im rlly confused and idk how to make it work

steel elm
#
local TouchedPart = game.Workspace.TestPart

TouchedPart.Touch:Connect(function(part)
    if part.Parent:FindFirstChild("Humanoid") then
        script.Parent.Visible = true
    end
end)

Is it possible to make it detect when "TestPart" is no longer being touched?

shy basin
viral basalt
#

my warnings increased heavily even though they don't popup in the developer console?

all I did was replace the lines of
local datafolder = ReplicatedStorage:WaitForChild("DataPlayer1")

with

local datafolder = ReplicatedStorage:WaitForChild("DataPlayer1", 60)

there are no warnings in the developer console whatsoever, but they spiked heavily after i implement these in the error tool metrics

steel elm
#

Nvm, i placed something wrong and now it works

bitter siren
#

anything wrong with this script?

steel elm
#

Thx anyways

median echo
#

nw

bitter siren
#

when i reset game starts lagging idk how to fix

shy basin
#

im still getting the error WHYYYYY

limpid crown
#

whats the diffrence between using workspace and script.parent if they both change properties (im new and trying to learn studio)

somber vault
#

can you make a global leaderboard with ProfileStore?

glacial juniper
#

Guys what's a 2 player obby idea

shy basin
tiny obsidian
limpid crown
#

What is the best coding basics tutorial?

haughty pagoda
#

Anyone know how to make a code for hourly bosses. Example a boss that spawns in once ever hour and stays alive for 15 minutes then despawns.

somber vault
#

and he just tries to scam kids to buy his course or books that are AI generated

limpid crown
somber vault
#

used to tell me about how his dad had a pron addiciton 😭

#

i still got the dms

limpid crown
somber vault
#

Yup

limpid crown
#

expose him bruu

somber vault
#

He used to go by StaySail

limpid crown
#

lol

somber vault
#

Just look up his name

#

on this discord chat

#

someone said "Worst developer ive met is staysail" lol

#

not just me cryingdead

limpid crown
somber vault
#

LMAOOO

gilded wind
#

Anyone wanna help me with a game it's actually rly cool idea dm if u want to help money is involved

vital mural
#

sI have a HUB System from which players can select which Map they want to spawn on, since the game is RP focused I need to send players to the Biggest server so they can actually play the game. However, this current system sometimes sends the player into a different server in the place it teleports them to. Can someone help me out and lmk if there's something I can do to fix the issue?

scenic pike
#

i dont want a tutor im just tryna see how i should get started

#

whether theres some youtuber or if i should learn it from somewhere else

slow coyote
#

Would any of yous know or are someone who can make scripts for helmets im trying to help my friend with a fire department game

onyx inlet
#

like FUCK OFF

somber vault
# scenic pike whatd u use to learn then

idk i've been in roblox studio for like 7 years i think i learned from alvinblox tutorials but he dont really post much anymore and dev fourm and roblox documentation when i need to do something

somber vault
scenic pike
ruby gazelle
scenic pike
#

fair ngl

#

i think tutorials are easy when u have experience from other languages tho

chilly canyon
ruby gazelle
#

But generally most actual knowledge can be used across all languages. That’s why learning programming patterns is so useful because they’ll always be relevant

#

but don’t worry about that until you’re at least somewhat proficient at lua

scenic pike
#

im probably gonna tap in tonight it does look pretty simple icl

ruby gazelle
#

Yeah i got all the basics out the way in abt 2 days, it’s more about focusing and dropping ur ego. If you know you don’t understand something don’t js move on, try to understand it and if you can’t look for other resources to help you

somber vault
#

Yoo, i set a model as a charcter and it works all good but i cant hear the sounds i put in the game anyone knows why>?

#

using beams can i change how many off the textures are showing up?

#

its so many

hallow linden
#

Now to divine what points of this apply to my code and what is just copy pasted

hallow linden
somber vault
#

OHHH okay

hallow linden
#

some of this just looks invalid for my code right

#

like, he mentions 200 lines

#

mine has 200

#

mentions varying the API

#

I only don't use physics really

#

I commented my code, tho apparently that wasn't enough? I'm not coding assembly here, I don't wanna insult anyone's intelligence

vernal peak
#

he got 2 series, beginner and advanced

#

i really like it

viral basalt
#

anyone knows the reason of these spikes?

#

99.99% sure not related to my game specifically, started happening after i've restarted the servers

vagrant shoal
#

is this a crude way of checking if a user has shift lock on?

abstract dagger
hallow linden
abstract dagger
#

very cool

somber vault
viral basalt
#

nvm its coming from coregui, which has nothing to do with me

#

roblox did an oopsie i think

umbral dock
viral basalt
#

its weird that this started happening after I updated my servers a few hours ago

#

it didn't happen when I updated servers 2 days ago

#

only now

eternal solar
#

do scripters make everything thereself or do they use other peoples work

tidal steppe
#

why cant i change the scale of a model via script

sudden estuary
eternal solar
smoky condor
#

Hi guys. Since im expanding my server to scripting, may I know yalls “popular” people in the scripting space?

sudden estuary
modern seal
#

😭

sudden estuary
shell imp
#

what are simple things to code to get better ?

limpid crown
#

What is a good tutorial for scripting basics for beginners that’s recent?

hexed cedar
#

I would suggest brawl devs tuts.

granite forge
#

Learn lua first then how to use it on roblox

random gulch
hollow plover
nova yarrow
#
local perlin = {}

local bxor = bit32.bxor
local rshift = bit32.rshift
local band = bit32.band

local PrimeX = 501125321
local PrimeY = 1136930381

--[[local gradPerm = { 151, 160, 137,  91,  90,  15, 131,  13, 201,  95,  96,  53, 194, 233,   7, 225,
    140,  36, 103,  30,  69, 142,   8,  99,  37, 240,  21,  10,  23, 190,   6, 148,
    247, 120, 234,  75,   0,  26, 197,  62,  94, 252, 219, 203, 117,  35,  11,  32,
    57, 177,  33,  88, 237, 149,  56,  87, 174,  20, 125, 136, 171, 168,  68, 175,
    74, 165,  71, 134, 139,  48,  27, 166,  77, 146, 158, 231,  83, 111, 229, 122,
    60, 211, 133, 230, 220, 105,  92,  41,  55,  46, 245,  40, 244, 102, 143,  54,
    65,  25,  63, 161,   1, 216,  80,  73, 209,  76, 132, 187, 208,  89,  18, 169,
    200, 196, 135, 130, 116, 188, 159,  86, 164, 100, 109, 198, 173, 186,   3,  64,
    52, 217, 226, 250, 124, 123,   5, 202,  38, 147, 118, 126, 255,  82,  85, 212,
    207, 206,  59, 227,  47,  16,  58,  17, 182, 189,  28,  42, 223, 183, 170, 213,
    119, 248, 152,   2,  44, 154, 163,  70, 221, 153, 101, 155, 167,  43, 172,   9,
    129,  22,  39, 253,  19,  98, 108, 110,  79, 113, 224, 232, 178, 185, 112, 104,
    218, 246,  97, 228, 251,  34, 242, 193, 238, 210, 144,  12, 191, 179, 162, 241,
    81,  51, 145, 235, 249,  14, 239, 107,  49, 192, 214,  31, 181, 199, 106, 157,
    184,  84, 204, 176, 115, 121,  50,  45, 127,   4, 150, 254, 138, 236, 205,  93,
    222, 114,  67,  29,  24,  72, 243, 141, 128, 195,  78,  66, 215,  61, 156, 180 };
]]
local function floor(x: number)
    return math.floor(x)
end

local function lerp(a: number, b: number, t: number)
    return a + (b - a) * t
end

local function quint(t: number)
    return t * t * t * (t * (t * 6 - 15) + 10)
end

local function hash2D(seed, x, y)
    local hash = seed
    hash = bxor(hash, x * PrimeX)
    hash = bxor(hash, y * PrimeY)
    hash = hash * 20261
    hash = bxor(hash, rshift(hash, 15))
    return band(hash, 0x7FFFFFFF)
end

local function grad2D(hash, x, y)
    local h = band(hash, 7)
    local u = h < 4 and x or y
    local v = h < 4 and y or x
    return ((band(h, 1) == 0 and u or -u) + ((band(h, 2) == 0 and v or -v)))
end

function perlin.noise(x, y, seed)
    seed = seed or 0
    local x0 = floor(x)
    local y0 = floor(y)
    local xd0 = x - x0
    local yd0 = y - y0
    local xd1 = xd0 - 1
    local yd1 = yd0 - 1
    local xs = quint(xd0)
    local ys = quint(yd0)
    x0 = x0 * PrimeX
    y0 = y0 * PrimeY
    local x1 = x0 + PrimeX
    local y1 = y0 + PrimeY
    local xf0 = lerp(
        grad2D(hash2D(seed, x0, y0), xd0, yd0),
        grad2D(hash2D(seed, x1, y0), xd1, yd0), 
        xs
    )
    local xf1 = lerp(
        grad2D(hash2D(seed, x0, y1), xd0, yd1),
        grad2D(hash2D(seed, x1, y1), xd1, yd1),
        xs
    )
    return lerp(xf0, xf1, ys) * 1.4142
end

return perlin
tame birch
#

wow

chilly canyon
spare laurel
#

ur just dumb bro

chilly canyon
spare laurel
#

just the truth

lapis oak
#

@fleet spoke Hey there!

#

You've verified?

fleet spoke
#

yeah

nova yarrow
ember nimbus
nova yarrow
ember nimbus
nova yarrow
ember nimbus
distant jay
#

anyone have tips on how to get hired to build a portfolio if u have none

terse vector
# distant jay anyone have tips on how to get hired to build a portfolio if u have none

People look for ability, that doesn't mean you need to have scripted a full game, but you need to show that you have the ability to do so. Do a specific feature. Say, you want to code working bow and arrow. Write it down, set a timer for 3 hours, and see what you can do. Hopefully, you will now have 1 portfolio item. If not, you have some coding to learn. Pick something that is hard, but do-able in 2-3 hours.

ebon glen
#

function AddNameTag()
    for i, v in pairs(workspace:GetDescendants()) do
        if v:IsA("Humanoid") then
            --    if v.Parent.Name == plr.Name then return end
            local BillboardGUI = Instance.new("BillboardGui")
            BillboardGUI.Parent = v.Parent:FindFirstChild("Head")
            BillboardGUI.AlwaysOnTop = true
            BillboardGUI.ResetOnSpawn = false
            BillboardGUI.StudsOffset = Vector3.new(0, 0.5, 0)
            BillboardGUI.Size = UDim2.new(0, 100, 0, 150)

            BillboardGUI.Name = v.Parent.Name.."NameTag"

            local TextLabel = Instance.new("TextLabel")
            TextLabel.Parent = BillboardGUI
            TextLabel.BackgroundTransparency = 1
            TextLabel.Position = UDim2.new(0, 0,0, -50)
            TextLabel.Size = UDim2.new(0, 100,0, 100)
            TextLabel.ZIndex = 10
            TextLabel.Font = Enum.Font.SourceSansBold
            TextLabel.TextStrokeTransparency = 0
            TextLabel.TextSize = 20
            TextLabel.TextYAlignment = Enum.TextYAlignment.Bottom

            local teamColor = game.Players:FindFirstChild(v.Parent.Name).Team -- RIGHT HERE
            if teamColor then
                TextLabel.TextColor3 = teamColor.Parent.TeamColor.Color  
            else
                TextLabel.TextColor3 = Color3.new(1, 1, 1)  
            end

            TextLabel.Text = v.Parent.Name            
        end
    end
end```

im trying to add name tags and when i try to make the color of the text the players team color it doesnt work
#

im like really tired rn so i barely understand my own code but

#

nvm i fixed it

#

            local teamColor = game:GetService("Players"):FindFirstChild(v.Parent.Name)
            if teamColor then
                TextLabel.TextColor3 = teamColor.TeamColor.Color
                if TextLabel.TextColor3 ~= Color3.new(1,1,1) then
                    TextLabel.TextStrokeColor3 = Color3.new(1,1,1)
                end
            else
                TextLabel.TextColor3 = Color3.new(1, 1, 1)  
            end
weak radish
#

Obviously I didn't need to redefine local player each time cus I had variables

#

and I was just being lazy

#

And the local script isn't in player gui it's in starter character scripts

lapis oak
#

I want to learn

remote yarrow
#

is there any script that make Parts Follow waypoints?

somber vault
#

shouldi learn modeling after i learn luau?

remote yarrow
pulsar acorn
#

there's a playlist that covers how to do this

remote yarrow
pulsar acorn
remote yarrow
copper tundra
#

guy7s what is the difference between delay and wait?

#

oh

#

thanks

bronze lynx
#

task.delay goes to the next line immefiately, while task.wait yields the thread

copper tundra
#

thanks

gusty pawn
#

it leaves out the important details

elfin timber
# copper tundra guy7s what is the difference between delay and wait?

Im pretty bad at explaining but imagine you have a function that spawns an npc and destroys it after 10 seconds.
using wait, the whole function would be halted untill the npc is destroyed after these 10 seconds, while using task delay would destroy the npc after 10 seconds, but the script would move on

gusty pawn
#

its basically a guide

somber vault
gusty pawn
#

Watch Brawldevs

somber vault
gloomy kraken
#

ad jumpscare

somber vault
gloomy kraken
lapis oak
#

@lost agate

gloomy kraken
somber vault
gloomy kraken
#

nvm he spent 5 minutes explaining how to add variables

somber vault
gloomy kraken
fresh belfry
#

i dont think watching tutorials are even useful

#

unless you know absolutely nothing

elfin timber
#

oh you said that already

gloomy kraken
elfin timber
#

what made me improve a lot is recreating simple games / toolbox items (after knowing the basics)

somber vault
fresh belfry
#

figure out the basic syntax then just start scripting

elfin timber
fresh belfry
#

watching tutorials for 10 hours will do nothing

somber vault
dark cedar
#

Yall what's best to use for combat and ability hitboxes? Raycast Or Shapecast or getpartsinpart or getpartbounds ??

gloomy kraken
fresh belfry
gloomy kraken
somber vault
fresh belfry
#

if you dont know how to do something just google / watch a small youtube vid on it

somber vault
#

tyyyyy @fresh belfry

#

i forgot most of the thing the last time i open roblox studio was 7 months ago

#

i think i need to start from the beginning

#

im just gonna read the docs

edgy mist
#

hi

raven dust
#

@shut sorrel yo

#

i fixed the problem but uh

#

i got a new one

#

u see the one on front doesnt do it

#

i deleted em n duplicated the working one again and checked if they are the same but it keeps doingi t

lapis oak
#

thanks

#

this lead me to remembering something

raven dust
#

i tried making em massless as well, theyre massless in the clip, nothing changes

raven dust
#

lemme try

#

nope doesnt work, also it only happens while playing the actual game in roblox, not in studio

#

and it fixed when i build a new rig and pasted the script inside of it instead of duplicating em, weird

#

hrp is off torso n head is on

#

alright i tested another thing, when i remove the script from the npc n duplicate em and then paste scripts manually it works fine

#

i think smth like that

#

nvm it still happens

verbal salmon
#

WHO IS AN UI DESIGNER

feral solstice
#

Lets say someone in roblox mobile is walking while holding a gun, he puts his finger on the target which is gonna trigger the tool activation, when the tool activated its gonna shoot a bullet BUT the mobile user is walking so it will detect his finger on the walking button before the finger that he put on the target, and the gun will shoot wrongly, how can i make it that it ignores any finger put on the walking button?

(Blox fruits uses what i want)
If u use a skill while walking it uses it where ur finger is aiming and not where you're finger that is put on the walking button

grizzled palm
#

my only problem in coding is long term memory, to get in that i need to practise so much even if I understand.

feral solstice
#

Wdym

#

Ok? What

abstract dagger
#

should look into it

#

would prolly help bind and unbind the walking action in mobile

#

idk i never worked with mobile but it's probably there

timber star
#

And what about non-instant magic projectiles? getpartBoundsInBox would be the best option too?

@digital canopy@abstract dagger

abstract dagger
#

tbh i've never worked with projectiles

#

i've had ideas tho, maybe an attachment/weld/something that travels along a line and you just kinda cast spatial query as it travels

#

there's definitely a better way to do it but i've never worked with projectiles

scenic torrent
#

anyone have reccomendations on youtubers to learn scripting for someone who has never sctipted

abstract dagger
#

devking is pretty good for beginners

#

a few of his stuff is a bit outdated but you'll get the gist of it

abstract dagger
#

prolly not welds

#

definitely not welds

dapper gulch
#

Hey everyone!

I'm looking for a motivated scripter to team up with me on a complex but with huge potential project, sadly no upfront payment as there's no budget yet, but you'll get a percentage of the game revenue when it’s launched and if we manage to find investors, even before launch.

Experience isn't a must as long as you're reliable, communicative, and can deliver what’s needed!

dapper timber
#

😬

somber vault
#

best scripter you can hire nowdays, uses chatgpt to code 😭

limpid crown
#

what is a print for? the videos im watching show how to use it but dont explain what its used for and what i does

somber vault
#

i use it to know if this and that works good

#

even tho i barely print

limpid crown
#

or scripting something basic

somber vault
limpid crown
somber vault
#

however when using variables you need to use their function

#

like

local myfunction = 10

#

myfunction()

somber vault
somber vault
limpid crown
#

oh ok

lean ocean
#

???

jovial halo
#
tween4:Play()```
why this only rotates the primary part, i only anchor the primary part, and everything are welded
noble granite
#

anyone can make a two player obby pad teleport system?

noble granite
#

alr dms

trail tendon
#

scipter

#

anyone?

keen hollow
#

Dm me if you wanna make a game with me

noble granite
#

anyone can make a two player obby pad teleport system? dm me

#

anyone can make a two player obby pad teleport system? dm me

trail tendon
#

anyone wanna help me make a blue lock game if your a adv scripter or a scripter at most dm me

spice sedge
#

wish there was a channel where you three could ask for developers

indigo coral
#

How do I turn this into a click detector?

narrow vault
noble granite
#

anyone can make a daily reward ssystem dm me

wind wagon
#

SCRIPTERS HELP ME

sonic juniper
#

hey guys

#

are there any scripters that like coryxkenshin?

#

i feel like i'm the only one

#

😭

tired violet
sonic juniper
#

that's obvious its just that i've yet to find them

#

its like looking for your doppelganger

#

they exist, but it feels so improbable

#

yfm?

tired violet
wide sparrow
abstract dagger
somber vault
#

why doesnt the proxpromt pop up

#

the script btw

replicatedStorage.Events.PlayerPlacedCrop.OnServerEvent:Connect(function(plr, player, oldCrop, Cframe)
    
    local crop = replicatedStorage.Crops:FindFirstChild(oldCrop)
    local progression = replicatedStorage.CropStages:FindFirstChild(oldCrop).Progression
    
    local timeMax = crop.GrowthTime.Value
    local stageTime = (timeMax / #progression:GetChildren())
    
    local newCrop = replicatedStorage.Crops:FindFirstChild(oldCrop):Clone()
    
    newCrop:PivotTo(Cframe.CFrame)
    newCrop.Parent = workspace.LoadedCrops
    
    print(timeMax, stageTime)
    
    local stage = 0
    
    repeat
        stage += 1
        
        newCrop.Build:ClearAllChildren()
        local stageObj = progression:FindFirstChild(stage):Clone()
        
        stageObj:PivotTo(Cframe.CFrame)
        stageObj.Parent = newCrop.Build
        
        wait(stageTime)
    until stage == #progression:GetChildren()
    print("Crop Finished Growing")
    
    local PickupPromtObj = Instance.new("Part")
    PickupPromtObj.Name = "PickupPromtObj"
    PickupPromtObj.CFrame = Cframe.CFrame
    PickupPromtObj.Transparency = 0
    PickupPromtObj.CanCollide = false
    PickupPromtObj.Anchored = true
    
    PickupPromtObj.Parent = newCrop
    
    local PickupPromt = replicatedStorage.vUI.CropPickupPrompt:Clone()
    
    PickupPromt.Parent = PickupPromtObj
end)
worn ingot
somber vault
#

Does anyone know why my game goes from 120 people to like 5 and does it over and over again it just spikes then goes down and up again

worn ingot
wide sparrow
wide sparrow
worn ingot
#

and it looks a lot like starscape to me

wide sparrow
#

tv show

thick mulch
#

Can one deobfuscate a code?

worn ingot
worn ingot
thick mulch
worn ingot
thick mulch
#
return(function(IIllIllllIIIlIllllI,lIlIIIIllI,lIIIlllIIIIlIllIlIIl)local IlIIIIIlllI=string.char;
    local IllIlllIllIIIlIlIIl=string.sub;
    local IllIllIIlIlI=table.concat;
    local lIIIlIIllIIlIl=math.ldexp;
-- Rest of the code...

Something like this

thick mulch
worn ingot
#

im not too knowledgable on obfuscators that are popular on roblox tho

digital canopy
worn ingot
#

probably like. ironbrew or luraph

worn ingot
thick mulch
#

Ill try these deobfuscators you said

bronze spoke
#

whats the best way to learn lua

wide sparrow
thick mulch
limpid crown
#

What’s the best beginner video for scripting?

remote yarrow
drifting iron
#

Why does playermodule sometimes make the script infinitely yield? (On the developer console, it never gets to PlayerModule print)

hollow plover
#

Guys do i use profile service? For my simulator

limpid crown
#

should I watch hiatus or brawldev's scripting guide?

gusty fog
hardy pilot
honest hill
somber vault
#

why doesnt the prox show up

replicatedStorage.Events.PlayerPlacedCrop.OnServerEvent:Connect(function(plr, player, oldCrop, Cframe)
    
    local crop = replicatedStorage.Crops:FindFirstChild(oldCrop)
    local progression = replicatedStorage.CropStages:FindFirstChild(oldCrop).Progression
    
    local timeMax = crop.GrowthTime.Value
    local stageTime = (timeMax / #progression:GetChildren())
    
    local newCrop = replicatedStorage.Crops:FindFirstChild(oldCrop):Clone()
    
    newCrop:PivotTo(Cframe.CFrame)
    newCrop.Parent = workspace.LoadedCrops
    
    print(timeMax, stageTime)
    
    local stage = 0
    
    repeat
        stage += 1
        
        newCrop.Build:ClearAllChildren()
        local stageObj = progression:FindFirstChild(stage):Clone()
        
        stageObj:PivotTo(Cframe.CFrame)
        stageObj.Parent = newCrop.Build
        
        wait(stageTime)
    until stage == #progression:GetChildren()
    print("Crop Finished Growing")
    
    local PickupPromtObj = Instance.new("Part")
    PickupPromtObj.Name = "PickupPromtObj"
    PickupPromtObj.CFrame = Cframe.CFrame
    PickupPromtObj.Transparency = 0
    PickupPromtObj.CanCollide = false
    PickupPromtObj.Anchored = true
    
    PickupPromtObj.Parent = newCrop
    
    local PickupPromt = replicatedStorage.vUI.CropPickupPrompt:Clone()
    
    PickupPromt.Parent = PickupPromtObj
end)
grizzled palm
#

bro made a block appear after a certain amount of time

#

wow so advanced and hard

vernal peak
upbeat jungle
#

my stupid knife does its old animations even after replacing them what do i do

somber vault
#

anyone use codewars

#

i need someone to approve a translation

drifting iron
#

wat da hell is a codewar

drifting iron
somber vault
#

yea

drifting iron
#

can you make sure there is a proximity prompt in the part while in run-time, do it by finding it in the explorer

somber vault
#

i cant approve my own translation

stable urchin
#

as for movement of the ships, I think that they move too fast considering their scale

#

and it'd look great if you added nozzles on the side of the spaceships to sell the idea of rotational thrust

calm pivot
#

does anyone know how i could make a smooth and satisfying odm gear system? please dm me if so

prisma meteor
limpid crown
#

Would AI be able to script meaning there isnt a point in learning scripting rn?

noble granite
#

anyone can code a two player obby system, where one player is on the skateboard which is controlling the direction, and one making it move. dm, (payment: robux, I’m poor on PayPal)

noble granite
limpid crown
#

idk

timber shadow
#

how would i add the face animation to the starter character?
i can only get it to work on the rig

merry compass
#

that fixed it for me

ebon wyvern
#

hi

sonic junco
#

why when i press export nothing happens?

ebon wyvern
#

is thedevking tutorial still the best tutorial?

static coral
#

his videos are not even tutorials

#

dont use his videos

#

watch brawldev instead

ebon wyvern
#

alr i will check em out

queen cosmos
stiff ibex
#

Worked more on PurpleConsole

limpid crown
#

What's a good video for scripting basics?

ashen gate
#

game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
if message:lower() == "/namekapat" then
local character = player.Character
if character then
local overheadGui = character:FindFirstChild("OverheadGui")
if overheadGui then
local username = overheadGui:FindFirstChild("Username")
if username then
local uiStroke = username:FindFirstChild("UIStroke")
if uiStroke then
uiStroke:Destroy() -- UIStroke'u yok et
end
end
end
end
end
end)
end)

whats wrong in my script ?

wide sparrow
wide sparrow
wide sparrow
wide sparrow
sleek lantern
#

Whats the verdict on reuploading dead games

summer scarab
#

Your console is showing

jaunty path
sleek lantern
jaunty path
sleek lantern
jaunty path
sleek lantern
jaunty path
hasty spindle
#

trust yourself a little vro

#

got mad trust issues

hallow linden
#

"Let me get some footage of my RC car to show the server, definitely won't have too much fun with this"

vestal pumice
#

you should change hte cframe of hte block too

stable urchin
round hill
#

yo

wooden glade
#

rig dont have animation btw

#

atleast i dont see it

limpid crown
#

Who should I watch to learn the basics of scripting I feel like brawldev doesnt explain a lot.

round hill
#

watch a scripting tutorial on more advanced stuff ig

#

search up like apprentice scripting playlist

#

and then move up to advanced

timid inlet
vestal pumice
verbal salmon
#

If semeone can do somes script for me for free that doesnt took a day dm me it will be very helpful !

quartz vortex
#

It take about a day for my chat gpt to make a actually working script smh

odd copper
#

Only way

unreal axle
#

fr

proud idol
wide sparrow
bitter orbit
#

anyone knows how to make a hug system?

molten plinth
bitter orbit
#

the animation isn't that hard to do

molten plinth
# bitter orbit the animation isn't that hard to do

As for the script, it’s up to preference; there’s a lot of ways to do it.
I would make the first player fire to server to show request for a hug. Then, a second player can fire to the server to hug, and the server will handle it for both players

#

I’m describing it very basic, but that’s sorta the framework

bitter orbit
#

Yeah ik that already but thanks for the info brother!

marble depot
#

got a really random question when scripting do you type the whole words or just tab to to fill em out

junior hemlock
marble depot
#

also how do you learn / practice scripting

#

im doing some really easy stuff beginner stuff like kill brick etc i keep following tutorials but cant seem to keep up or either i will loose motivation

peak jolt
#

it will take thousands of hours of conscious effort to become a master, losing motivation after the first few is just silly

marble depot
gleaming summit
#

for some reason I see the part but when i test pla I don't see it why is that?

unreal axle
#

you probably turned off can collide and left anchored off as well

fast bone
#

Yo Can somone Help me I bought a game but everything for sale is 1 robuk how can I change that]

#

Also i dont have any of the things in my inv

spiral jungle
fast bone
spiral jungle
fast bone
spiral jungle
fast bone
spiral jungle
#

The ones there are probably owned by the people who sold you the game

#

And then you have to edit the code to use your gamepasses instead of theirs

fast bone
#

Bro i cant even find where he did the code

silver drum
#

has anyone tried venturing out to programming other than roblox lua? how has that gone?

plush lichen
#

u mean a college degree? lol

silver drum
#

i heard people get stuck to only roblox lua after some time

#

yeah basically ig, like learning other languages n wut not, like a real life "i work for microsft" type job?

#

bc of learning roblox?

plush lichen
#

im gonna intern at amazon soon, didn't start with roblox

#

learning lua these past few days / past week ish

#

honestly i think i got the hang of it, lua is so easy

silver drum
#

OOOO thats so cool brah im genuinely so happy for you, im trying to learn roblox first before learning other languages, trying to get that programmer mindset before moving on

#

wut language u learn?

plush lichen
#

well

#

i know a bit of a few

silver drum
#

-first before moving on

plush lichen
#

i know a bit of python

silver drum
#

OOOO

plush lichen
#

a bit of java

#

in school i mostly use cpp

#

most real world projects require u to know javascript

silver drum
#

nice nice ncie, so some of a few on hand i see, very nice

#

how long did all that take u?

plush lichen
#

idk im lazy so i didn't really try learning it on my own, i just learned when school forced me to learn

silver drum
#

over all regardless, very impressive im happy for u

plush lichen
#

but game dev is pretty fun so i'm like half motivated to try and learn it

silver drum
#

AHAHHAHA WHAT, damn i wish shcool did that to me xD thats cool tho congrats on ur future job :v

#

oh fair enough thats understandable, im trying to learn n make games bc its true what they say ab roblox "infinite games but no games"

plush lichen
#

if you're trying to learn how to code, then honestly yea i'd recommend roblox game dev cause a lot of it is basic OOP

#

and that's what's gonna set u up for future jobs a lot of the time

#

just thinking in small parts

silver drum
#

yes exactly, im j scared of not realizing that im stuck on the roblox world and cant do anything outside of it yk. whats OOP tho in this context?

plush lichen
#

and a lot of it correlates to how projects are made outside of roblox

silver drum
#

im not very word savy yet on all this lingo

plush lichen
#

roblox really teaches u this well

silver drum
#

oh yes yes, after some time its j simple copy n paste from ur own stuff into other games w j a few modifications

plush lichen
#

and oh right, don't follow tutorials

#

and if u do, try to actually understand what people are writing or why they're doing things a certain why and see if it can be improved somehow

silver drum
#

yes, i have tried learning to code for the last several years tbh n every time i do i get stuck in tutorial hell n give up after a few weeks

plush lichen
#

i mean, i think you see the problem

#

just stop doing tutorials and go make something from scratch

#

and if you say "that's too hard, i don't understand how to start" and just give up after thinking that then maybe programming isn't really for you

silver drum
silver drum
wide sparrow
#

any thoughts on what i should improve for the damage impact visuals? i dont want it to be over the top explosions but needs to be visible yknow

plush lichen
#

explosions would indicate actual damage being done such as parts / debris coming off wouldn't it

spare reef
#

Would any mid scripter like to join my dev team and help make a game like grow a garden.

wide sparrow
#

like right now i have a flash of orange on impact

somber helm
somber helm
#

Or are you trying to do something else

wide sparrow
#

well yeah im trying to strike a balance between realistic and fun/cool

somber helm
#

Everything seems to be going in a certain order rather than randomized events

wide sparrow
mortal elm
#

quick question, how do i make a part that spawns randomly? just like a horror game that is looking for a key (example). so that, the key place is randomized in somewhere. i really need this, please let me know :)

wide sparrow
#

well or more like mostly random time

wide sparrow
#

yeah thats because they all get spawned in at the same time

somber helm
#

Also maybe bigger explosions( but that might be vfx)

#

Like more realistic ones

wide sparrow
#

then as stuff slows down, ships move into positions where their weapons won't be able to target and slowly it becomes random

#

when players get ships, they'll obviously target at random times so it won't look bad at all, but for AI i'll have some math.random in there for "ai reaction time"

wide sparrow
#

i feel the explosions are rlly big rn

somber helm
#

Also one more cool suggestion

wide sparrow
#

because of how im zooming the cam in the video it seems small but this size is:

somber helm
#

Maybe when there's a explosion you can make the screen shake

wide sparrow
#

yes will be doing that because those r super cool

somber helm
#

Yes adds realism and maybe

#

Make a cam goujg through an explosion

#

And then like there's a fiery effect on the screen

wide sparrow
#

as well as depending on close to railgun, railgun shots also will also shake screen a bit

somber helm
#

I don't know if that's a bit difficult tho

wide sparrow
somber helm
#

And then you get like ash visuals or something on screen or something

#

Idk

wide sparrow
#

hm

timber shadow
verbal salmon
hoary cedar
#

Lol

ivory bronze
#

can someone give me an idea to code someting? (not too complex)

ivory bronze
hoary cedar
clear mural
hoary cedar
ivory bronze
hoary cedar
ivory bronze
#

idk what that is

#

ohh

#

mb i get it

edgy ferry
#

Making a 'grow a garden' type of game, but the plot wont assign to the player. Its supposed to add a value to the plot and say the user on the GUI but it doesnt work.

hardy pilot
#

That sucks

edgy ferry
#

What sucks, the script or the fact that it doesn work?

hardy pilot
#

The fact it doesnt work

hardy pilot
#

Also no reason to contain the character added function in another function

#

Also if you sent both bits of code, did you print to find out which one's broken?

#

Because youre either not calling it or the method doesnt work

somber vault
#

if any one wants a builder i can help

edgy ferry
#

hm

edgy ferry
#

Ye, i was bouta say that im just gonna try another script instead of this one

raven sonnet
edgy ferry
raven sonnet
#

Next make server script that when player joins it checks the plots for empty owner attribute

#

When it finds 1 it sets that attribute to the player name

#

And when player leaves it finds the attribute with that player names and it sets it to ""

#

U can add that it sets the sign next to that plot to the player name

edgy ferry
#

Alright, thank you!

raven sonnet
#

Np if u need smth just ping me

edgy ferry
chilly canyon
#

Second

raven sonnet
#

Just leave it empty

#

The "" I ment in setattribute

edgy ferry
#

Oh, alright

chilly canyon
#

The first Owner is the name of that Attribute and the second is the value

raven sonnet
#

In script

edgy ferry
#

Alright, and now i have to make a script for it?

#

to work

edgy ferry
#

Make sense

raven sonnet
#

Haha

edgy ferry
#

And the previous script that i used wont work?

raven sonnet
chilly canyon
#

Hhaa

#

Haha

raven sonnet
#

U can copy what I said above and paste that to chat gpt look how he made it and based on that make you're own script

#

Or watch tutorials

edgy ferry
#

Alright, thank you

regal geyser
#

Any Asian here who can help my game? Just a quick combat test. ( I am Asian so i need fellow w same ping as me 🙂 )

hardy pilot
#

Any 6'3" 6 figures paycheck men who can help playtest?

#

:<

charred night
#

ye

shell heart
#

Im here

#

In like 72 hours

sinful niche
#

Kquit now

abstract dagger
#

your character's lefthand should have folders called "R6" and "R15ArtistIntent"

#

idk just read the error

#

it just says it

restive ermine
#

yo anyone on?

jaunty path
#

Does this look like r6 to you

tardy pasture
#

smh why do testers expect pay ?

rare basin
lofty plinth
#

depends on the tester ngl

#

if they wanna do it out of fun then its eh

tardy pasture
lofty plinth
#

but if its not out of enjoyment but instead to find bugs and write detailed reports kinda makes sense 2 pay em

rare basin
#

I usually just get a couple of friends or acquaintances that would be interested to help with that
i feel like getting testers is too much hassle

lofty plinth
#

it really is most of the time

tardy pasture
hardy pilot
#

They usually are

#

People go bananas over exclusivity

polar furnace
#

Somebody give me a scripting task to do in studio

buoyant junco
#

@pearl inlet

pearl inlet
#

does for example minecraft

#

look like perlin noise

buoyant junco
#

mhmhm

pearl inlet
#

it has some perlin noise "features"

pseudo egret
pearl inlet
#

but it has some irregularities

#

so pretty much combining perlin noises allows you to make those irregularities

buoyant junco
#

yes i do that?

pearl inlet
#

well you can

buoyant junco
#

is there like a problem with my perlin noises?

pearl inlet
#

but there is one more problem

#

with perlin noise

#

in general

#

it's hard to make it random

buoyant junco
pearl inlet
#

cuz if you make a math.noise(1mil,1,mil)

buoyant junco
#

perlin noises is a controlled random isnt it.

pearl inlet
#

as perlin noise gets more regular

#

the further it gets

#

(the roblox one)

buoyant junco
#

yeah?

#

it return only

#

-1-1, but u can scale it though

#

sorry but what do u want to say, i dont really understand why you explaining all of this.

slow quest
#

if u cant script in 2025 its over ngl

#

like who cant do lua đŸ€Ł

jolly vessel
pearl inlet
slow quest
#

what does if mean in scripts someone help 😭

jolly vessel
pearl inlet
#

unless you make a custom perlin noise

rare basin
slow quest
jolly vessel
#

It's used to print something in the console

#

if("hello world")

rare basin
slow quest
rare basin
slow quest
rare basin
regal geyser
jolly vessel
regal geyser
#

like during 2016 era i used to do the same but it was quite a long time ago

pearl inlet
rare basin
slow quest
#

IK what apis are like the stuff that runs the code is what it is, so i can make scripts

abstract dagger
white seal
foggy thistle
slow quest
#

help fix this pls

#

do
if parent.enum
then add
+1 walkspeed every step
when every step
if walkspeed 16 then walkspeed 0
then
add parent.child remove walkspeed.99
add 0 to walkspeed 99
or +1

(end
(end

                (end
foggy thistle
#

Bro is coo ked

verbal salmon
#

Who can script for me for free

#

Fr fr

#

Who

#

Like its Ă  trash smiluator every time u jump u get older

proud idol
sudden estuary
pearl inlet
#

exactly

#

it won't do anything in that formation

#

but

#

if you do

tacit tendon
#
for i, v in pairs(self.ActivePlayers) do
        if team1 == false then
            v.Team = self.RedTeam
            team1 = true
        elseif team1 == true then
            v.Team = self.BlueTeam
            team1 = false
        end
        
        local SelectedSpawn = Spawns:FindFirstChild("SpawnPoint".. math.random(1, 4)) 
        
        task.defer(function()
            v.Character:FindFirstChild("HumanoidRootPart").CFrame = SelectedSpawn.CFrame
        end)
    
        
        PlayerLoader.Load(v)
        
        self.TeamsUi = game.ReplicatedStorage.Assets.UI.TeamsUI:Clone()
        self.TeamsUi.Parent = v.PlayerGui
        self.TeamsUi.Enabled = true
        
        task.spawn(function()
            v.Character:GetAttributeChangedSignal("Eliminated"):Connect(function()
                -- here
            end)
        end)
    end

Is this a fine way to manager my team system? Where I just listen to an attribute to increase either Blue or Red teams score

pearl inlet
# honest hill whats the purpose of do
local hello = "Hello"

do
  local name = "John"
  print(name) -- It will print John
end

print(hello,name) -- It will print Hello, nil (as do end is a different block of code)
#

but if something is above it

honest hill
#

so its like running a script inside a script

pearl inlet
#

like the hello var

#

it can still use it

honest hill
#

but not change it?

#

thats like a function running immediately instead of waiting to be called

pearl inlet
honest hill
#

o ye

proud idol
#

But in my experience it doesnt have any practical uses

#

¯_(ツ)_/¯

arctic badge
#

how do I add a luck boost

weak radish
#

If the multiplier is 2 it will be 2x as likely to land on special

weak radish
arctic badge
arctic badge
slow quest
#

can you guys help me my code wont run here it is

do
if.enun.part= "kill brick"
then
reset to part.variable.spawn, keep health - (this is for keeping the health)
add "death counter"
make 1
create.text
text.variable.is: "oh no"
text.variable.is: "u died"
text.variable.is: "too bad"
(end
(end

sudden estuary
keen hollow
#

Who wanna work on a game with me

craggy niche
#
local Players = game:GetService("Players")
local MarketplaceService = game:GetService("MarketplaceService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local PlayerValues = ReplicatedStorage.PlayerValues
local GamepassEvent = ReplicatedStorage:WaitForChild("RemoteEvents"):WaitForChild("GamepassPurchased")
local VFXGamepassID = "000000"

local VFXOwners = {
    
}

function giveGamepass(Gamepass, Player)
    if not Player then
        return
    end
    
    if not Gamepass then
        return
    end
    
    local UserID = Players:GetUserIdFromNameAsync(Player)
    
    if MarketplaceService:UserOwnsGamePassAsync(UserID, VFXGamepassID) == true then
            
    
    end
end

how do i insert the player into VFXOwners table

eager geode
verbal salmon
#

Bro people here will never script 10 mins for free

proud idol
verbal salmon
verbal salmon
rare basin
proud idol
#
  • you are demanding people to script for you for free on what is most likely a slop simulator game
static coral
weak radish
#

Do you know how weighting works?

sudden estuary
weak radish
sudden estuary
sudden estuary
#

then its not "2x luck"

weak radish
#

Bro

sudden estuary
#

its just a illusion

weak radish
#

BRI

sudden estuary
#

prove me wrong

#

it alters the chance, but its not 2x luck, hence its false

#

now lets say u have more than 2 items, how wouldu decide what to multiply with the factor

proud idol
#

its def more math than jsut multiplying the chances

#

it really depends on how the rarity system is setup

weak radish
sudden estuary
ivory kite
weak radish
#

And that question was stupid

proud idol
#

youd have to increase the odds of the rare items by a factors, while reducing the odds of the common ones by the amount of chance the rare items increased

ivory kite
sudden estuary
light pollen
#

HEY

sudden estuary
#

works for sure tho

ivory kite
sudden estuary
sudden estuary
light pollen
#
local Njerez = game.Players.LocalPlayer
local message = "Për atdhenë! Ndero Shqipërinë!"

game:GetService("Chat"):Chat(patriot.Character.Head, message, Enum.ChatColor.Red)
wait(2)
game:GetService("Chat"):Chat(patriot.Character.Head, "Gjithmonë do të jemi të fortë! Shqipëri, lindje e shpresës!", Enum.ChatColor.Red)

``` why doesnt work
weak radish
sudden estuary
#

it is

proud idol
weak radish
#

Bro

proud idol
#

otherwise ull be out of the range of the 0-100% chance

sudden estuary
weak radish
#

you have a dictionary with each rarity as a sub table, if it's a member of "rare" multiply weight by multiplier

sudden estuary
#

determing what to increase and what to decrease is problematic

proud idol
sudden estuary
#

fair

weak radish
#

If it exceeds 100 that doesn't matter

proud idol
#

which judging by him goign with double instead of integers

#

it def matters

sudden estuary
sudden estuary
ivory kite
#

I can show you how I did my weighted system for my procedurally generated tile system, it shouldn't matter the size of the array

weak radish
#

In a weighted system

ivory kite
#
function module.ChooseWeighted<K, V>(tbl: { [K]: V }, chanceMapper: ((V) -> number)?, random : Random?): (V, K)
    if typeof(random) ~= "Random" then 
        random = Random.new() 
    end
    
    local totalWeight = 0
    local first : V, key : K

    -- Get weights
    local weights = {} :: { [K]: number } -- reverse lookup for choosing alg, dont bother running chanceMapper in both loops
    for k, element in tbl do
        if not first then
            first = element
            key = k
        end
        local weight = if typeof(chanceMapper) == "function" then chanceMapper(element) elseif typeof(element) == "table" then (tonumber(element.Weight) or 0) else 1
        weights[k] = weight :: number
        totalWeight += weight :: number
    end

    -- Choose from weight
    local index = random:NextNumber(0, totalWeight)
    totalWeight = 0
    for k, element in tbl do
        totalWeight += weights[k]

        if totalWeight >= index then
            return element, k
        end
    end

    return first, key
end
#

Now obviously there's a lot of better ways of going about this but this has worked extremely well for me and I'm running this roughly 500 times a second

#

You can pass a specified function to give elements specified rarities

#

So you could use it like

local ItemPool = {}
local Item = module.ChooseWeighted(ItemPool, function(element)
    local Weight = element.Weight or 0
    if element.Rare then Weight *= 2 end
    return Weight
end
#

In my case (because I have some special tiles) that sometimes appear I have it set like this:

    return General.table.ChooseWeighted(CachedData, function(element)
        local maxAmt = tonumber(element.MaxAmount) or 0
        local curAmt = tonumber(existingTiles[element.ModuleScript]) or 0
            if (maxAmt > 0 and curAmt >= maxAmt) or table.find(BadTiles, element.ModuleScript) then
                return 0
            else
                return tonumber(element.Weight) or 1
            end
        end, SRand:GetRandom(Seed))
weak radish
# sudden estuary show it done with a pool of items like pet sim
Pool = {[1] = {Common = 0.25,ReallyCommon = 0.5},[2] = {Rare = 0.15,ReallyRare = 0.1}}
function GetRandPrize()
    
    local Multiplier = 0
    local Weight = 0
    
    
    for ChanceType,RollTable in Pool do
        if ChanceType >= 2 then
            Multiplier = 2
        else
            Multiplier = 1
        end
        for Roll,Chance in RollTable do
            Weight += Chance*Multiplier
        end
    end

    local RandNumber = math.random(1,Weight*100)
    Weight = 0

    for ChanceType,RollTable in Pool do
        if ChanceType >= 2 then
            Multiplier = 2
        else
            Multiplier = 1
        end
        for Roll,Chance in RollTable do
            Weight += Chance*Multiplier

            if Weight*100 >= RandNumber then

                return Roll
            end
        end
    end
end
print(GetRandPrize())```
#

Obviously you can make it look nicer/more efficient but thats just something quick I made

pine torrent
#

Chatgpt

little rose
next dome
#

not even shit is chatgpt

pine torrent
#

Deepseek

next dome
#

dumb

#

wow

#

😭

little rose
#

its not

pine torrent
#

💔

little rose
#

wait but

#

it has a cheaper & effective way

next dome
verbal salmon
little rose
verbal salmon
#

Cause i cant afford scripter and im not a scripter

little rose
#

but theyre exp asf

verbal salmon
next dome
pine torrent
verbal salmon
cedar idol
#

yoo

verbal salmon
cedar idol
#

hi

little rose
next dome
verbal salmon
verbal salmon
little rose
verbal salmon
#

IF IM A BUILDER

little rose
#

jacks of all trades

next dome
pine torrent
little rose
next dome
#

time to update my discord

verbal salmon
#

Partial

#

Ok good for u bye

next dome
#

they have

tacit tendon
little rose
next dome
little rose
next dome
#

yeah

little rose
#

but then we gotta insert the emails ourselves

#

in the end

#

cuz mc doesnt know wat emails we created

#

if this is the case

#

might as well send the emails ourselves

rancid vapor
#

Why isnt my chat bubble showing?

zealous path
#

NQv/vcv

rancid vapor
#

Im trying to make a game called click for letters, basically u click and u get enough letters to type a sentence

weak radish
zealous path
#

import random
import string

chars = " " + string.punctuation + string.digits + string.ascii_letters
chars = list(chars)
key = chars.copy()

random.shuffle(key)

plain_text = input("Enter a message to encrypt: ")
cipher_text = ""

for letter in plain_text:
index = chars.index(letter)
cipher_text += key[index]

print(f"original message : {plain_text}")
print(f"encrypted message: {cipher_text}")

cipher_text = input("Enter a message to encrypt: ")
plain_text = ""

for letter in cipher_text:
index = key.index(letter)
plain_text += chars[index]

print(f"encrypted message: {cipher_text}")
print(f"original message : {plain_text}")

rancid vapor
weak radish
#

I MADE THAT EXACT GAME

rancid vapor
#

great minds think alike

weak radish
#

HANG ON

rancid vapor
#

@weak radish can we dm instead of here

bitter siren
#

what does this mean 🙏

ivory kite
# tacit tendon Yes, that's correct

You don't need to spawn a thread for the attribute changed signal, connected functions run in their own thread
I don't know how else you're accounting for players you add later but you should most certainly put this whole loop in a separate function to clean it up

proud idol
#

which yk, those dont have that cause they are booleans

#
local boolean = true
boolean:Destroy() --> this erros
bitter siren
proud idol
bitter siren
#

discord not letting me send code

ivory kite
proud idol
bitter siren
#

script is too big

ivory kite
#

Send line 40 of your Config code

proud idol
# bitter siren

dotn share the full script, just the segment where its erroring

bitter siren
#

--[[

]]

-- Settings
local preventToolUsage = true -- Set this to false to allow players to equip tools inside the GZ.
local fadeDuration = 0.7 -- Duration of icon fade effect.
local forcefieldStatus = false -- False for invisible forcefield, set to true to make the forcefield visible.

-- Main code, be cautious!
local TweenService = game:GetService("TweenService")
local part = script.Parent
local playersInPart = {}

local function tweenTransparency(imageLabel, startTransparency, endTransparency)
local tweenInfo = TweenInfo.new(fadeDuration, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)
local tween = TweenService:Create(imageLabel, tweenInfo, { ImageTransparency = endTransparency })
tween:Play()
end

local function onPlayerLeave(player)

local forcefield = playersInPart[player.Name]
if forcefield then
    forcefield:Destroy()
end
#

its supposed to be a safezone script

ivory kite
#

Can you put the code in a code block? It's easier to read in syntax highlighted blocks
```lua

```

bitter siren
#

asddsad

#



]]



-- Settings
local preventToolUsage = true -- Set this to false to allow players to equip tools inside the GZ.
local fadeDuration = 0.7 -- Duration of icon fade effect.
local forcefieldStatus = false -- False for invisible forcefield, set to true to make the forcefield visible.











-- Main code, be cautious!
local TweenService = game:GetService("TweenService")
local part = script.Parent
local playersInPart = {}

local function tweenTransparency(imageLabel, startTransparency, endTransparency)
    local tweenInfo = TweenInfo.new(fadeDuration, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)
    local tween = TweenService:Create(imageLabel, tweenInfo, { ImageTransparency = endTransparency })
    tween:Play()
end

local function onPlayerLeave(player)

    local forcefield = playersInPart[player.Name]
    if forcefield then
        forcefield:Destroy()
    end ```
gray maple
#

Main code, be cautious!

ivory kite
#

Okay I see your issue

proud idol
#

judging by the output window, this is the one that errors out

local function onPlayerLeave(player)

    local forcefield = playersInPart[player.Name]
    if forcefield then
        forcefield:Destroy()
    end
ivory kite
#

Where are you setting playersInPart?

proud idol
#

is this right?

bitter siren
#

i have no idea i bought this game had so many bugs had to remove lot of guis bc game was hella laggy after you reset characther

bitter siren
ivory kite
#

Ctrl f playersInPart

bitter siren
proud idol
# bitter siren yes

okay heres the issue, the Player variable is not really the player, is the part that has finished touching

ivory kite
proud idol
#

youd have to do this

bitter siren
#

can i pay you to fix it 🙏

proud idol
#
local function onPlayerLeave(Hit : Part)

    local forcefield = Hit.Parent:FindFirstChildOfClass("ForceField")
    if forcefield then
        forcefield:Destroy()
    end
ivory kite
#

That doesn't sort out the playersInPart being set

proud idol