#code-discussion

1 messages ¡ Page 269 of 1

gritty laurel
#

how long can it take?

#

do you own a game?

ruby shore
#

Nah , i am making just systems rn practicing everysingle day

#

By making ability or some function

#

but i am implementing every course

gritty laurel
#

how long have you been doing that

ruby shore
#

i bought or every tutorial i watched

#

Well listen i been in roblox studio for over a year i gived up so many times

#

but this past 2 months i been grinding

#

and i learned 1000% more

#

then the past 1 year

gritty laurel
#

what game will you make?

ruby shore
#

i love Anime Genre

#

but probabbly first some money grab game

gritty laurel
#

like so you get money?

#

why do people do like this when they do games

deft coral
#

The english in here is hilarious

iron kraken
deft coral
#

Honestly admirable

gritty laurel
#

first they do like south london then south london 2 then south london remastered

#

for better graphics?

eternal mason
#

PAYING people to script for my game! dm me

ruby shore
deft coral
faint hollow
#

is anyone here good for finding a virus 😭 my game's showing hd admin popups right as i released it now, some people get it some dont but i cant find it anywhere

copper spindle
jovial moat
#

1 robux per hour payment

tame rose
tame rose
glass briar
#

Hello guys

#

could yall help me script/fix this coin thingy

#

game.Players.PlayerAdded:Connect(function(Players)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = Players
local cash = Instance.new("IntValue")
cash.Name = "Cash"
cash.Parent = leaderstats
cash.Value = 0

local coin = game.Workspace.Coin


coin.Touched:Connect(function(otherPart)
    local humanoid = otherPart.Parent:FindFirstChild("Humanoid")
    if humanoid then
        wait(1)
        cash.Value = cash.Value + 1
        wait(1)
        coin:Destroy()

    end
end)

end)

#

it keeps like giving the player lots of coins when ever the player touch it

#

i only want it to give 1 coin

mortal steppe
#

Anyone can help me how can i learn scripting

ember creek
#

if humanoid then
wait(1)
cash.Value = cash.Value + 1
coin:Destroy()

    end
end)

end)

#

smthing like ts

pallid hull
#

Anyone here specialise in making advanced combat systems I have a question about them

glass briar
ember creek
#

if that doesnt work then sorry idk

glass briar
#

Ahh okay ty for the help tho

sleek sapphire
#

Isn’t it because there isn’t a debounce? I could be wrong but wouldn’t every part in the player have the potential to active that one coin?

glass briar
#

Oh yea you're right

ember creek
#

Oh yeah could be that

glass briar
#

How would I use the denounce never used it before

sleek sapphire
#

Well a debounce is just a term, what I might do is have a table of the active coins and when ever a player first touches them, get rid of it from the table. Since you can then implement another if check to make sure that the coin hasn't been "used up"

#

This would ensure that lets say the torso can't activate it again if maybe the arm touched it

#

Since you already removed it from the table

glass briar
#

Ahhh okay

glass briar
cloud snow
#

so the data sort in my game exploded can anyone help me😂

hard garden
#

hey

regal salmon
spark orchid
#

Should I make my own SoftShutdown System or rely on the roblox restart servers?

idle thistle
#

does anyone know how to implement the cmdr api an a roblox game and then add your own commands to it

ember nimbus
#

"does anyone know" yeah the docs

idle thistle
#

i have i dont undersatnd it

#

my brain isnt braining its like on another level of stupid

silver verge
#

where are you stuck

heady vale
molten jackal
#

roblox shutdown system is cheeks

icy dew
#

I've not had a problem with the Roblox restart server system. I've heard it used to be bad

spiral jungle
#

But you should still have your own soft shutdown script

#

Cause Roblox just kicks everyone and asks them to rejoin

#

So if your player’s in the middle of something and they just get kicked they might lose progress on something

#

And also instead of kicking and asking to rejoin you can just teleport them to a new server instead of letting Roblox handling it

spark orchid
twilit steeple
#

does anybody know any read only properties of any instance?

hasty mesa
#

then the children

#

t[prop]

fallow jay
#

guys what do yall think: can gimmick games still do a bit even nowadays? (ex: 1 robux = something)

mossy rover
#

can someone help me get better at scripting

#

im like mid

spiral jungle
#

Except players in existing servers totally get kicked out

prime ether
mossy rover
#

im not working on a game

elder juniper
#

Who wants a denim jacket template png? for 500 rbx [DM if anybody interested]

crude edge
#

willing to join a project for rbx

cold stone
#

profile store or service?

#

apparently profile store is the updated version

static coral
cold stone
#

preciate it

deft pagoda
#

Hello

crude edge
#

any game ideas?

knotty nymph
#

😭

lethal yoke
#
local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")  
local Animation = script.Animation

local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)

local newSpeed = 26
local defaultSpeed = 16
local targetFov = 90  
local defaultFov = 70  

UserInputService.InputBegan:Connect(function(Input)
    if Input.KeyCode == Enum.KeyCode.LeftControl then
        local Player = game.Players.LocalPlayer
        local Character = Player.Character or Player.CharacterAdded:Wait()
        local Humanoid = Character:WaitForChild("Humanoid")

        Humanoid.WalkSpeed = newSpeed
        local camera = game.Workspace.CurrentCamera

        local fovTween = TweenService:Create(camera, tweenInfo, {FieldOfView = targetFov})
        fovTween:Play()

        local Anim = Humanoid:LoadAnimation(Animation)
        Anim:Play()

        UserInputService.InputEnded:Connect(function(Input)
            if Input.KeyCode == Enum.KeyCode.LeftControl then
                Humanoid.WalkSpeed = defaultSpeed

                local fovTweenBack = TweenService:Create(camera, tweenInfo, {FieldOfView = defaultFov})
                fovTweenBack:Play()

                Anim:Stop()
            end
        end)
    end
end)```
#

chat is this good?

#

im a begginer

shy cipher
# glass briar game.Players.PlayerAdded:Connect(function(Players) local leaderstats = Insta...

why are you naming a single player "Players"?

also. your wait(1) doesn't do what you think it does. the character has multiple parts, and the reason why the player gets a lot of coins from touching it "once" is because a lot of character parts are touching the coin at a time. the wait(1) only makes that happen a second later. what you need is a cooldown on the coin, not a wait. if you want it to be a once-only thing, you can either add a "pickedUp" boolean or store the Touched event connection and disconnect it when the first valid part is detected

shy cipher
shy cipher
lethal yoke
#

Hmm ok

#

So should I js remove the bottom one

shy cipher
# lethal yoke ```lua local UserInputService = game:GetService("UserInputService") local TweenS...

a lot of data leaks here too. you make a lot of tweens while the older tweens are still in memory, I think the GC (garbage collector) does trash them after a while (as it does with variables you can't access anymore) but there's another thing it won't trash. you make an InputEnded event connection every time you press leftcontrol, this creates a lot of inputended connections that will stay there forever and hog up the memory and potentially create race conditions (which are known for crashing your script in "one in a million" chances)

#

move the InputEnded outside of the InputBegan

shy cipher
# lethal yoke So should I js remove the bottom one

you should create the tweens once outside of the functions and store them in the outermost scope (basically where you defined Userinputservice), this way you can reuse the same old tweens without being harsh on memory

move the InputEnded outside of InputBegan so there's only ONE event connection, not 10.

lethal yoke
#

For me being a beginner i didnt understand jack

shy cipher
shy cipher
#

lmk if you need help tho

exotic phoenix
#

for whatever reason my raycast doesnt work after I add parameters to filter out my map

            local function AssignSpawnPoint()
                for _, i in pairs(self.ChestSpawns) do
                    if i:HasTag("Occupied") then continue end
                    i:AddTag("Occupied")
                    
                    
                    return i.CFrame
                end
            end

            local spawnLocation = AssignSpawnPoint()
            local origin = Chest.PrimaryPart.Position + Vector3.new(0,20,0)
            local direction = Vector3.new(0,-100,0)
            local size = Chest:GetExtentsSize()
            local halfHeight = size.Y / 2
            local params = RaycastParams.new()
            params.FilterType = Enum.RaycastFilterType.Include
            params.FilterDescendantsInstances = {
                self.Map
            }
            
            print(self.Map.Parent)
            
            local raycast = workspace:Raycast(origin,direction,params)
            
            if raycast then
                local finalY = raycast.Position.Y + halfHeight
                
                Chest.Parent = self.Map
                Chest:PivotTo(CFrame.new(spawnLocation.Z,finalY,spawnLocation.X))
            end
lethal yoke
shy cipher
exotic phoenix
shy cipher
exotic phoenix
#

It's weird because its only doing that after I put a filtered list of instances it can only collide with

shy cipher
#

I think it's because self.Map is probably a model (a container) and not a physical part or mesh

exotic phoenix
#

anyway I tried using descending instances (:GetChildren) but it also didnt work

shy cipher
#

may be so, I'll check out the documentation

exotic phoenix
shy cipher
exotic phoenix
#

I REMOVED THE PARAMS AND ITS IN A COMPLETELY NEW LOCATION

#

the issue at hand might be different from what I originally thought

exotic phoenix
#

thanks for help

exotic phoenix
#

create another table and insert all of the parts into it just to then pass it onto params?

shy cipher
#

because GetChildren() already gives you a table

exotic phoenix
#

yeah I did that b4

#

it also didnt work

shy cipher
#

but you sure that your rays are going where you want them to go

exotic phoenix
#

works like a charm.

#

😼

shy cipher
exotic phoenix
#

its js the params

#

I'm adjusting them rn

#
  • the calculations
shy cipher
exotic phoenix
#

thanks for help banan

#

you're goated

#

I appreciate you homie

shy cipher
#

it's cool white boy

#

see you

modern seal
haughty oar
#

Anyone can hop on vc and help me out with coding? A td system ? I need help

waxen edge
#

Yo is layout really important mine is kinda mid

#

Well it isn’t that organised

mighty bolt
#

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

local part = script.Parent

local lastPosition = part.Position

-- Velocity uppdate
RunService.Stepped:Connect(function(_, deltaTime)
local currentPosition = part.Position
local deltaPosition = currentPosition - lastPosition
part.AssemblyLinearVelocity = deltaPosition / deltaTime
lastPosition = currentPosition
end)

--
local sides = {
Vector3.new(0, 0, -10), -- forward
Vector3.new(0, 10, 0), -- upp
Vector3.new(0, 0, 10), -- back
Vector3.new(0, -10, 0), -- down
}

while true do
for _, offset in ipairs(sides) do
local tweenInfo = TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.InOut)
local tween = TweenService:Create(part, tweenInfo, {CFrame = part.CFrame * CFrame.new(offset)})
tween:Play()
tween.Completed:Wait() -- vänta tills tweenen är klar innan nästa sida
end
end

#

I finally made it

#

pretty simple but still

haughty oar
mighty bolt
lilac turtle
sullen fox
#

is there any better animaters then spr?

manic hare
mighty bolt
chilly canyon
mighty bolt
chilly canyon
#

Cool

lilac turtle
shy bronze
#

how should i handle fps guns? do i give the server the origin and the direction and let the server handle the rest? (i want to achieve smooth shooting like most fps games)

mighty bolt
lilac turtle
#

Yeah. Most of the time you can do it with events / RunService

#

and while true loops are just dangerous

mighty bolt
lilac turtle
mighty bolt
#

the game js crashed.......

#

wow

lilac turtle
#

I'm not experienced though so take it with a grain of salt.

lilac turtle
mighty bolt
shy bronze
lilac turtle
#

Perchance

exotic phoenix
#

what is this?

mighty bolt
#

good question

plush forge
distant hamlet
#

shit barely look any different

fluid fog
ruby kite
ruby kite
ruby kite
hard garden
# exotic phoenix what is this?

type stuffs like this

type shi = {
smell: string,
amount: number
}

local poop: shi = {
smell = "stinky",
amount = 5
}

-- poop: {smell: string, amount: number}
hard garden
#

rawr

neon grove
#

woof

neon grove
#

gif is sending

#

oh it sl got sent

#

k

bitter harbor
#

i keep getting an error in math.random(1, v[2])

local function GetRandomRarity(RarityData)
for i, v in pairs(RarityData) do
local RolledNumber = math.random(1, v[2])
if RolledNumber == 1 and v[2] > RarityData[1][2] then
return {
v[1],
v[2],
v[3],
v[4]
}
end
end
return RarityData[1]
end

i don't understand why can anyone help me

ruby kite
#

@bitter harbor

bitter harbor
vestal herald
#

looking for a lua scripter to do a spleef system, very simple system with round system and coins gain system when won. pay in robux dm me asap!!!

bitter harbor
# ruby kite what's the output error
--local Characters = require(game.ReplicatedStorage.Modules:WaitForChild("Characters"))
local SpawnArea = game.Workspace:WaitForChild("SpawnZones"):WaitForChild("SpawnPart1")
local WaitTime = 2

local RarityData = {
    {"Common", 2, Color3.fromRGB(85, 170, 0)},
    {"Rare", 5, Color3.fromRGB(170, 0, 255)},
    {"Mythic", 10, Color3.fromRGB(255, 0, 0)},
    {"Legendary", 20, Color3.fromRGB(255, 255, 0)}
}

local function GetRandomRarity(RarityData)
    for i, v in pairs(RarityData) do
        local RolledNumber = math.random(1, v == 20 and 1 or v[2])
        if RolledNumber == 1 and v[2] > RarityData[1][2] then
            return {
                v[1],
                v[2],
                v[3],
                v[4]
            }
        end
    end
    return RarityData[1]
end


while task.wait(3) do
    local RandomRarity = GetRandomRarity(RarityData)
    local CharacterModels = Characters[RandomRarity[1]]
    local RandomNumber = math.random(1, #CharacterModels:GetChildren())
    
    local CNPC: Model = Characters.CloneCharacter(CharacterModels:GetChildren()[RandomNumber].Name, workspace.Characters)
    local CHumanoid: Humanoid = CNPC:WaitForChild("Humanoid")
    local CTorso: Part = CNPC:WaitForChild("Torso")
    
    local function SpawnCharacter(amount)
        for i=0, amount do

            local X = math.random(SpawnArea.Position.X - SpawnArea.Size.X/2+1, SpawnArea.Position.X + SpawnArea.Size.X/2)
            local Y = CNPC.Box.Size.Y/2 + SpawnArea.Position.Y + SpawnArea.Size.Y + 1.5
            local Z = math.random(SpawnArea.Position.Z - SpawnArea.Size.Z/2, SpawnArea.Position.Z + SpawnArea.Size.Z/2)

            CNPC.HumanoidRootPart.CFrame = CFrame.new(X, Y, Z)
            CNPC.Parent = workspace.Zombies
            wait(WaitTime)
        end
    end
    
    if not CTorso then
        CNPC:Destroy()
        return
    end
    
    SpawnCharacter(5)
end

vagrant saddle
#

Can someone please tell me why does API for checking what does the player have in his inventory as an accessory?

ruby kite
#

Get raw output data please or atleast something that's erroring

ruby kite
bitter harbor
#

imma see if there is smth wrong in my module script

fallow jay
#

yo guys

#

i REALLY really need to test my thumbnails

#

i need yall to look at these thumbnails im gonna post rn

#

and tell me if they look convincing

fallow jay
#

guys do these thumbnails look convincing

ruby kite
fallow jay
fallow jay
ruby kite
vagrant saddle
#

For some reason when i use the api with v1/users/(userid)/collectables it dosent works

ruby kite
fallow jay
#

alr

fallow jay
ruby kite
fallow jay
#

since my game is about investing in tons

#

i will add caseoh as a gamepass

ruby kite
ruby kite
fallow jay
#

not for monetization but uh

#

goofy

ruby kite
vagrant saddle
#

I reseached it but it say i need somekind of cookies?

#

I seriously dont know, I really need help

ruby kite
#

I'm sure you're not using proxies to access it. By default those APIs are blocked to access from yourself

stuck egret
#

can someone help how should i make this (the code on the video is just to show what i want to do)

bitter harbor
sly stream
#

can anyone help me figure out how to store very very large numbers in the leaderboard store so I can display them:

                if leaderboard.Name == "Cash" then
                    MoneyOrderedStore:SetAsync(player.UserId, statValue * 10^-100)
                else
                    SpeedOrderedStore:SetAsync(player.UserId, statValue)
                end
            end)

and then displaying:

        if leaderboard.Name == "Cash" then
            Temp.ValueLabel.Text = Abbreviate.Abbreviate(playerData.value * 10^100)
        else
            Temp.ValueLabel.Text = Abbreviate.Abbreviate(playerData.value)
        end
lethal yoke
#

@shy cipher

local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Camera = workspace.CurrentCamera

local Animation = script.Animation
local AnimTrack = Humanoid:LoadAnimation(Animation)

local newSpeed = 26
local dSpeed = 16

local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
local targetFov = 90  
local originalFov = 70  

local fovTween = TweenService:Create(Camera, tweenInfo, {FieldOfView = targetFov})
local fovTweenBack = TweenService:Create(Camera, tweenInfo, {FieldOfView = originalFov})

UserInputService.InputBegan:Connect(function(input, gameProcessed)
    if gameProcessed then return end

    if input.KeyCode == Enum.KeyCode.LeftControl then
        Humanoid.WalkSpeed = newSpeed
        fovTween:Play()
        AnimTrack:Play()
    end
end)

UserInputService.InputEnded:Connect(function(input, gameProcessed)
    if gameProcessed then return end

    if input.KeyCode == Enum.KeyCode.LeftControl then
        Humanoid.WalkSpeed = dSpeed
        fovTweenBack:Play()
        AnimTrack:Stop()
    end
end)```
is this what you meant by 

create the tweens once outside of the functions and store them in the outermost scope (basically where you defined Userinputservice), this way you can reuse the same old tweens without being harsh on memory And to move the InputEnded outside of InputBegan so there's only ONE event connection, not 10.
sly stream
vivid sable
#

Someone help me figure out how to function viewmodel

#

Please

#

Ive done everything

fallow jay
ruby kite
ruby kite
# sly stream can anyone help me figure out how to store very very large numbers in the leader...

luau data memory pointer values can only accept 64 double precision floating points

so if you're going with this you should use an external library that handles the values and mashes it into bytes. Like that much value is equal to 1 KB, with an external library? 6 bytes. you use the library to translate that data such as 1.5e1000 something, and rewrite that as a string. Then you update the datastore with JSONEncode

sly stream
ruby kite
ruby kite
sly stream
crude edge
#

game ideas?

vivid sable
#

fps game

ruby kite
# sly stream ohh do you know any specific one that handles such big numbers?

Sure I guess its
https://devforum.roblox.com/t/infinitemath-go-above-103081e308/2182434/2

I'm not sure I haven't used any of these modules yet. You can find a lot of them in community resources of DevForum

ruby kite
vivid sable
ruby kite
#

for animations you can just make an AnimationController, inside Animator inside your viewmodel and animate it. Kinda how rigs work

fallow jay
#

YO i wanna test my game for any bugs can someone volunteer?

sullen island
#

would anyone check out my hunting game mechanics and tell me if they look nice

ruby kite
vivid sable
mighty bolt
#

guys how did I even get the "skill" role

shy cipher
ruby kite
shy cipher
crude edge
#

want to make a game, any game ideas?

lethal yoke
#
local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Camera = workspace.CurrentCamera

local Animation = script.Animation
local AnimTrack = Humanoid:LoadAnimation(Animation)

local newSpeed = 26
local dSpeed = 16

local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
local targetFov = 90  
local originalFov = 70  

local fovTween = TweenService:Create(Camera, tweenInfo, {FieldOfView = targetFov})
local fovTweenBack = TweenService:Create(Camera, tweenInfo, {FieldOfView = originalFov})

local sprintKeyDown = false
local isSprinting = false

local function updateSprint()
    local isMoving = Humanoid.MoveDirection.Magnitude > 0

    if sprintKeyDown and isMoving then
        if not isSprinting then
            isSprinting = true
            Humanoid.WalkSpeed = newSpeed
            fovTween:Play()
            AnimTrack:Play()
        end
    else
        if isSprinting then
            isSprinting = false
            Humanoid.WalkSpeed = dSpeed
            fovTweenBack:Play()
            AnimTrack:Stop()
        end
    end
end

updateSprint()

Humanoid:GetPropertyChangedSignal("MoveDirection"):Connect(updateSprint)

UserInputService.InputBegan:Connect(function(input, gameProcessed)
    if gameProcessed then return end

    if input.KeyCode == Enum.KeyCode.LeftControl then
        sprintKeyDown = true
        updateSprint()
    end
end)

UserInputService.InputEnded:Connect(function(input)
    if input.KeyCode == Enum.KeyCode.LeftControl then
        sprintKeyDown = false
        updateSprint()
    end
end)```

made a variable to see if they're sprinting
and  a function that updates it and runs it once when u start, and runs it when move direction is changed
#

@shy cipher

shy cipher
# lethal yoke ```lua local UserInputService = game:GetService("UserInputService") local TweenS...

not how I would have done it. you don't really need to know if the player is sprinting, you just need to know when the keybind for sprint was pressed and unpressed (which the event connections are already doing). I would have made a function that zoomed in or out and played the corresponding animation depending on a boolean state. make the function run when the key's pressed and set the walkspeed, same for InputEnded but this time set to default walkspeed and the function state set to false. you can't really have race conditions here, you can't press leftcontrol again while leftcontrol is held so you don't need a separate isSprinting variable for safety. you can't leave leftcontrol if you don't have it pressed too.. so this has unnecessary complexity

lethal yoke
# shy cipher not how I would have done it. you don't really need to know if the player is spr...
local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Camera = workspace.CurrentCamera

local Animation = script.Animation
local AnimTrack = Humanoid:LoadAnimation(Animation)

local newSpeed = 26
local dSpeed = 16

local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
local targetFov = 90  
local originalFov = 70  

local fovTween = TweenService:Create(Camera, tweenInfo, {FieldOfView = targetFov})
local fovTweenBack = TweenService:Create(Camera, tweenInfo, {FieldOfView = originalFov})

local function updateSprint(sprinting)
    local isMoving = Humanoid.MoveDirection.Magnitude > 0

    if sprinting and isMoving then
        Humanoid.WalkSpeed = newSpeed
        fovTween:Play()
        AnimTrack:Play()
    else
        Humanoid.WalkSpeed = dSpeed
        fovTweenBack:Play()
        AnimTrack:Stop()
    end
end

UserInputService.InputBegan:Connect(function(input, gameProcessed)
    if gameProcessed then return end

    if input.KeyCode == Enum.KeyCode.LeftControl then
        updateSprint(true)  
    end
end)

UserInputService.InputEnded:Connect(function(input)
    if input.KeyCode == Enum.KeyCode.LeftControl then
        updateSprint(false)  
    end
end)```
shy cipher
shy cipher
#

yeah it's pretty much production-ready

lethal yoke
# shy cipher this is good, trying to improve it further would be hyperoptimising and would pr...
local UserInputService = game:GetService("UserInputService")
local TweenService = game:GetService("TweenService")

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Camera = workspace.CurrentCamera

local Animation = script.Animation
local Animator = Humanoid:WaitForChild("Animator")
local AnimTrack = Animator:LoadAnimation(Animation)

local newSpeed = 26
local dSpeed = Humanoid.WalkSpeed

local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
local targetFov = 90  
local originalFov = Camera.FieldOfView  

local fovTween = TweenService:Create(Camera, tweenInfo, {FieldOfView = targetFov})
local fovTweenBack = TweenService:Create(Camera, tweenInfo, {FieldOfView = originalFov})

local sprinting = false

local function updateSprint(sprintingInput)

    local isMoving = Humanoid.MoveDirection.Magnitude > 0

    if sprintingInput and isMoving then
        if not sprinting then
            sprinting = true
            Humanoid.WalkSpeed = newSpeed
            fovTween:Play()
            if not AnimTrack.IsPlaying then
                AnimTrack:Play()
            end
        end
    else
        if sprinting then
            sprinting = false
            Humanoid.WalkSpeed = dSpeed
            fovTweenBack:Play()
            if AnimTrack.IsPlaying then
                AnimTrack:Stop()    -- This is so it doesnt overlap every single time you sprint and unsprint same for the part above 
            end
        end
    end    
end


UserInputService.InputBegan:Connect(function(input, gameProcessed)
    if gameProcessed then return end

    if input.KeyCode == Enum.KeyCode.LeftControl then
        updateSprint(true)  
    end
end)

UserInputService.InputEnded:Connect(function(input)
    if input.KeyCode == Enum.KeyCode.LeftControl then
        updateSprint(false)  
    end
end)

Humanoid:GetPropertyChangedSignal('MoveDirection'):Connect(function()
    updateSprint(UserInputService:IsKeyDown(Enum.KeyCode.LeftControl))
end)

Player.CharacterAdded:Connect(function(char)
    Character = char
    Humanoid = Character:WaitForChild('Humanoid')
    Animator = Humanoid:FindFirstChildWhichIsA('Animator')
    if not Animator then
        Animator = Instance.new('Animator')
        Animator.Parent = Humanoid
    end
    AnimTrack = Animator:LoadAnimation(Animation)
    dSpeed = Humanoid.WalkSpeed
    originalFov = Camera.FieldOfView
    fovTween = TweenService:Create(Camera, tweenInfo, {FieldOfView = targetFov})
    fovTweenBack = TweenService:Create(Camera, tweenInfo, {FieldOfView = originalFov})
    sprinting = false
end)```
vestal condor
#

its not very practicle tho if im being honest

shy bronze
#

i made a thick bullet with hitbox, but how can i verify the shot and prevent exploits?

glass goblet
#

yo can anyone help out with ts

#

game.Players.PlayerAdded:Connect(function(plr)
local char = game.Workspace.qqqq
local br = char:FindFirstChild("folder")
print("found it")
local bq = br:FindFirstChildOfClass("Texture")
print("br")
print(bq.Parent.Name)

end)

#

im trying to get the name of the part without directly referencing it

azure coral
#

friendly reminder to check your recieve bandwidth to make sure its not like this game over here

#

(over 50KB/s is when stuff becomes more and more laggy)

glass goblet
#

This was just a small test script I made for troubleshooting

#

All the models will have different names

round rapids
#

so different models on the same folder?

glass goblet
#

Not really lemme explain a bit better

glass goblet
#

In the actual gae

#

Game*

#

Instead of part it would be the name of the model

#

Now I wanna know the name of the model so I can display it or Smt

#

But it could be any one of the models in the game

round rapids
#
game.Players.PlayerAdded:Connect(function(plr)
    local char = game.Workspace:WaitForChild("qqqq")
    local folder = char:FindFirstChild("Folder")

    if folder then
        local texture = folder:FindFirstChildWhichIsA("Texture", true)

        if texture then
            print(texture.Parent.Name)
        end
    end
end)``` smth like this?
glass goblet
#

Yep

#

so instead of “findfirstchild”

#

I used descendent

#

Cuz yk the texture is in a part

#

And that doesn’t work

#

There is no error

round rapids
#

isDescendent checks if something is inside of a part like it doesent help find the actual object that your looking for or get its name automaticcly

#

automatically

glass goblet
#

So before it was a texture

#

I made it a bool value

#

And tried to find the first descent with that name

#

And set that to a variable like br

#

Now I tired br.parent

#

But it doesn’t work

round rapids
#

IsDescentdent those is not for finding actual objects and getting its properties

#

it only returns like a boolean you need to use FIndFirstChildWhichIsA() instead

glass goblet
#

Problem is

#

It’s not a child of the folder

#

Would it still work?

elder plover
#

I need an answer guys.
I started making this game right and coded some of the game mechanics like Ore mining and stuff like that (resources gathering mechanic) but i was wondering should i build my game environment first then start coding it or no (what makes the process faster later on)
(i am a beginner into coding so that's why i am asking)

round rapids
#

if its not a child of folder than local texture = folder:FindFirstChildWhichIsA("Texture", true) will return nothing

glass goblet
#

It’s just preference tho for me

glass goblet
#

How do I get the properties

#

Of the texture

#

Like the parent

#

So we have folder with a part

#

With a texture

#

Now I wanna get to the part without calling its name

elder plover
wet herald
#

I just coded my profile store and the leaderstats isnt showing up does anyone know why?

local function Initialize(player: Player, profile: typeof(PlayersStore:StartSessionAsync()))

local leaderstats = Instance.new("Folder", player)
leaderstats.Name = "leaderstats"

local money = Instance.new("NumberValue", leaderstats)
money.Name = "Money"
money.Value = profile.Data.Money

local rebirth = Instance.new("NumberValue", leaderstats)
rebirth.Name = "Rebirth"
rebirth.Value = profile.Data.Rebirth

ReplicatedStorage.events.UpdateMoney:FireClient(player, profile.Data.Money)
ReplicatedStorage.events.UpdateRebirths:FireClient(player, profile.Data.Rebirth)

end

elder plover
# wet herald I just coded my profile store and the leaderstats isnt showing up does anyone kn...
  1. The "Race Condition" (Most Likely)
    When you use Players.PlayerAdded, your script might start running after you have already joined the game (especially in Studio). If the player joins before the PlayerAdded connection is established, the code never runs for you.

The Fix: Wrap your logic in a loop to catch players who are already there.

Lua
local function OnPlayerAdded(player)
-- Your Profile loading logic here
local profile = PlayersStore:LoadProfileAsync("Player_"..player.UserId)
if profile then
Initialize(player, profile)
end
end

-- Connect the event
game.Players.PlayerAdded:Connect(OnPlayerAdded)

-- ALSO run it for players already in the server
for _, player in game.Players:GetPlayers() do
task.spawn(OnPlayerAdded, player)
end
2. Case Sensitivity
Roblox is extremely picky about the name. It must be exactly "leaderstats" (all lowercase).

"Leaderstats" (Uppercase L) — Will not work.

"leaderStats" (CamelCase) — Will not work.

Your code currently uses leaderstats.Name = "leaderstats", which is correct, but double-check that there isn't a typo in your actual script.

  1. Profile Loading Failure
    If PlayersStore:StartSessionAsync() (or LoadProfileAsync) fails or takes too long, your Initialize function never gets called.

Check your Output window: Do you see any errors related to DataStores?

Add a Print: Add print("Initializing " .. player.Name) at the very top of your function. If it doesn't print, the problem is with how you're calling the function, not the folder creation itself.

Pro-Tip: Parenting Order
As mentioned before, it's better to parent the folder after you've put the values inside it. This ensures the leaderboard doesn't try to render an empty folder first.

Lua
local function Initialize(player: Player, profile: any)
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"

local money = Instance.new("NumberValue")
money.Name = "Money"
money.Value = profile.Data.Money
money.Parent = leaderstats

local rebirth = Instance.new("NumberValue")
rebirth.Name = "Rebirth"
rebirth.Value = profile.Data.Rebirth
rebirth.Parent = leaderstats

-- Parent last!
leaderstats.Parent = player

end
Would you like me to look at the part of your script where you connect PlayerAdded to see if there's a logic error there?

elder plover
hushed obsidian
#

Can anyone help me create a team morph script

wet herald
#

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

local ProfileStore = require(ServerScriptService.Lib.ProfileStore)
local Template = require(ServerScriptService.Data.Template)
local DataManager = require(ServerScriptService.Data.DataManager)

local function GetStoreName()
return RunService:IsStudio() and "test" or "live"
end

local PlayersStore = ProfileStore.New(GetStoreName(), Template)

local function Initialize(player: Player, profile: typeof(PlayersStore:StartSessionAsync()))

local leaderstats = Instance.new("Folder", player)
leaderstats.Name = "leaderstats"

local money = Instance.new("NumberValue", leaderstats)
money.Name = "Money"
money.Value = profile.Data.Money

local rebirth = Instance.new("NumberValue", leaderstats)
rebirth.Name = "Rebirth"
rebirth.Value = profile.Data.Rebirth

ReplicatedStorage.events.UpdateMoney:FireClient(player, profile.Data.Money)
ReplicatedStorage.events.UpdateRebirths:FireClient(player, profile.Data.Rebirth)

end

local function PlayerAdded(player: Player)

local profile = PlayersStore:StartSessionAsync("Player_" .. player.UserId, {
    Cancel = function()
        return player.Parent ~= Players
    end,
})

if profile ~= nil then

    profile:AddUserId(player.UserId)
    profile:Reconcile()

    profile.OnSessionEnd:Connect(function()
        DataManager.Profiles[player] = nil
        player:Kick("Data error occured. Please rejoin.")
    end)

    if player.Parent == Players then

        DataManager.Profiles[player] = profile
        Initialize(player, profile)

    else
        profile:EndSession()
    end


else
    player:Kick("Data error occured. Please rejoin.")
end

end

#

for _, player in Players:GetChildren() do
task.spawn(PlayerAdded, player)
end

local function PlayerRemoving(player: Player)
local profile = DataManager.Profiles[player]
if not profile then return end
profile:EndSession()
DataManager.Profiles[player] = nil
end

Players.PlayerAdded:Connect(PlayerAdded)
Players.PlayerRemoving:Connect(PlayerRemoving)

hushed obsidian
elder plover
#

that's basic to make

hushed obsidian
#

Ive tried ai

#

Nothing works

elder plover
hushed obsidian
#

Its either a bunch of errors or is outdated

#

What is ide?

elder plover
#

Download Antigravity

hushed obsidian
#

What is antigravity..

elder plover
#

and use CLAUDE SONNET AI

hushed obsidian
#

Studio plugin?

elder plover
#

nope

#

Ide, ai agent

hushed obsidian
#

Alright..

wise birch
#

anyone know how to attach a part to a rig that can be aniamted with the rig I tried using motor 6d but it doesnt aniamte the part

hushed obsidian
hushed obsidian
#

Im trying to chat with it and ask it but it's saying I would love to answer thos but upgrade to pro

boreal latch
#

anyone would help me to recreate the fish lighting?

static delta
#

who needs a free logo
i just need 3 people and it actually gonna be good completly free

shy bronze
#

how can i get the point of direction to make a bullet raycast it is broken for me:

local direction = origin + camera.CFrame.LookVector * MAX_RANGE
proven plover
#

show the whole script, ur just showing a snippet

white seal
storm laurel
white seal
#

it plays but snapping tool demonic and fucks teh first 2 seconds

storm laurel
#

the clicking animation lowkey nice

#

idk why but the clicking sound is very satisfying

small heron
#

im new to analytics service but what is the right way of displaying data about ability usage? im not sure if im doing it correctly
this is my code:

                    ["PlayerID"] = plr.UserId,
                    ["Timestamp"] = os.time(),
                    ["Team"] = team,
                    ["Ability"] = equipped,
                    ["AbilityType"] = abilityType,
                })```
white seal
#

@storm laurel u have any song ideas i should add to it?

shy bronze
shy bronze
# proven plover show the whole script, ur just showing a snippet
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local Player = Players.LocalPlayer
local ShootRemote = ReplicatedStorage.Shared.Remotes:WaitForChild("Shoot")

local Assets = ReplicatedStorage:WaitForChild("Shared"):WaitForChild("Assets")
local BulletHitbox = Assets:WaitForChild("Utils"):WaitForChild("BulletHitbox")

local BulletsContainer = workspace:WaitForChild("Bullets")

local Shoot = {}

local MAX_RANGE = 1000

function Shoot.CreateHitbox(origin, hit)
    local distance = (hit - origin).Magnitude
    local direction = (hit - origin).Unit
    local middle = (origin + hit) / 2
    
    local bullet = BulletHitbox:Clone()
    bullet.Parent = BulletsContainer
    bullet.Size = Vector3.new(distance, bullet.Size.Y, bullet.Size.Z)
    bullet.CFrame = CFrame.lookAt(middle, hit) * CFrame.Angles(0, math.rad(90), 0)
    
    -- Debug
    local p = Instance.new("Part")
    p.Anchored = true
    p.Size = Vector3.new(10,10,10)
    p.Parent = workspace
    p.Position = hit
end

function Shoot.Fire()
    local character = Player.Character
    if not character then return end

    if not Player:GetAttribute("IsDeployed") then return end
    if Player:GetAttribute("Debounce") then return end

    local camera = workspace.CurrentCamera

    local origin = camera.CFrame.Position
    local direction = camera.CFrame.LookVector * MAX_RANGE
    
    local raycastParams = RaycastParams.new()
    raycastParams.FilterDescendantsInstances = workspace:WaitForChild("Map"):GetChildren()
    raycastParams.FilterType = Enum.RaycastFilterType.Include
    
    local ray = workspace:Raycast(origin, direction, raycastParams)
    if ray then
        direction = ray.Position
    end
    
    Shoot.CreateHitbox(origin, direction)
end

return Shoot
storm laurel
storm laurel
white seal
proven plover
shy bronze
proven plover
storm laurel
# shy bronze whats that

get center of screen using cam.viewportsize.x/2 and y/2 then use viewportpointtoray to create a ray from the camera through te exact pixel of the center of screen

#

basically using the center pixel of the screen for the ray

proven plover
#

if this helps a lil

#

the other guy basically explained it to u

hot abyss
#

can someone help me

storm laurel
# shy bronze whats that
GunEvent:FireServer(tool, "Shoot", {Origin = mouseRay.Origin, Direction = mouseRay.Direction})```
something similar i did with one of my projects
hot abyss
#

whats the best way to hold a static r6 model (as a tool)

shy bronze
#

k ill try

proven plover
#

@shy bronze the ScreenPointToRay returns a unit ray, from the unit ray you can retrieve the origin and direction

#

not much coding to do

grim furnace
#

im not really experienced on how i could incorperate that into roblox studio

shy bronze
#

@proven plover @storm laurel thanks for help i got it working

grim furnace
#

also would it cost money?

#

for ai subscriptions

proven plover
shy bronze
glass mica
#

can any models/builders hrlp me rq cant post images here

regal salmon
white seal
rare kelp
#

preesh

slow crow
#

@brittle perch

storm laurel
white seal
modern aspen
#

bro believes news about engineers…

#

it’s just marketing yk

#

ai is tool, not person who will do it for u, and for complex systems lua knowledge is must have

#

try to steal a brainrot with claude and you will spend a ton of time and not even be sure that it the best option + the option you wanted from start

#

ai can help a lot, but not replace fully in complex project, such as forge for example

icy dew
#

If "hardly anyone can compete with the AI models now" why are so many scripters still being hired and why are the best studios using real people instead of AI?

fallow hollow
#

as a previous owner of chat gpt plus I can tell you, claude free is better

fallow hollow
icy dew
fallow hollow
#

oh wtf

#

why am I in code discussion 😭

#

Ohhhhhhh

#

I thought I was in dev discussion

icy dew
fallow hollow
#

atlwast in roblox Ive had no issues

forest fjord
#

AI cant handle too many lines of code tho

icy dew
#

In my experience AI produced scripts/games tend to be more buggy and lesser quality than human-made ones

forest fjord
#

yeah

#

also ai code is so dead like full of comments and bugs and when u tell it to fix the code its even worse

#

scripters will still be needed for long time

icy dew
#

Yes that's true as well. AI can't diagnose Roblox issues like a human can. It will very often think something is causing an issue when in reality the problem is something else that's obvious to a person

forest fjord
#

yeah

#

also if u use ai u will never feel the joy after hard work when ur script somehow finally works 😄

modern aspen
#

and chatgpt doing bad, what is better, claude that works good but short, or chatgpt that works bad but long

safe depot
#

can saomeone help me with my game called steal a dev i need help with base skins i alr have the model

glass mica
#

can someone help me I have a bottle model and i want it to flip in the sky( like bottle flip) everytime i try it just goes straight up. I even tried using ai and they cant do it either

gilded raft
#

Just make other accounts

frail yarrow
#

LLMs sorta reach their limit when dealing with more dynamic game environments

#

esp. wrt roblox because its not very well represented in their dataset

errant oxide
gilded raft
frail yarrow
#

im not talking about context or anything

glass mica
errant oxide
glass mica
errant oxide
#

because with rotation and vector3 dont make animation just moves the object

errant oxide
unique mesa
#

any competent scripters available?

midnight geode
round rapids
regal salmon
unique mesa
unique mesa
turbid socket
unique mesa
real grotto
glacial cradle
#

is there any documentation of what can or cannot be published with filter async for broadcast so i can educate my players on what to put in a sign to avoid being tagged?

deft coral
#

so basically two buckets: anything thats crude or offensive and anything that could identify you or asks identification from someone else

errant elm
#

can someone tell the LLMs about not using ipairs in 2026 ffs

mild sequoia
#

does scripting need science and math

deft coral
fading ermine
#

no science

errant elm
#

half of roblox's undocumented bullshit was discovered via the scientific process

fading ermine
#

uhh

#

no

errant elm
#

just today i discovered that models parented to parts don't replicate from the server to client

#

took like a 4 stage null hypothesis testing to reach that

fading ermine
#

i mean after a while the scientific proccess becomes common sense

#

u jus do it

errant elm
#

k

fading ermine
#

i mean thats not the science i was thinking of 💀

#

but u have a point

silk patio
#

YO PLS SOMEONE HLEP ME

fading ermine
#

wyw

silk patio
#

my game is dimmed out when i test it but when im codin and shi its bright af

fading ermine
#

in game lightning

silk patio
#

but why is it for the very top tho?

errant elm
#

you have a script somewhere putting a screengui with a big ah semi-transparent frame in

silk patio
#

ahhh ok thx

errant elm
#

MexicoFilter script

silk patio
#

waltuh

errant elm
#

im just a dumbahh, hypothesis rejected

silk patio
#

ok, so what else can it be

#

thx for trying twin

clear anchor
clear anchor
#

"life's just a never-ending cycle of grinding"

clear anchor
#

fr dont get banned lol

clear anchor
#

dont post hiring stuff here use the marketplace

errant temple
clear anchor
errant temple
#

That’s what a bot would say

clear anchor
lean ocean
clear anchor
#

yeah i need it

clear anchor
#

k, got it

grim void
#

just made a WORKING health bar

#

im using react library btw if you want to ask

clear anchor
#

what's the issue you're running into with react?

rapid eagle
clear anchor
#

idk maybe for reusable ui components or smthn

regal salmon
clear anchor
#

idk it jus is

shy cipher
regal salmon
#

bro is NOT floppa08871 💔

clear anchor
#

lol

#

e

mighty bolt
#

e

clear anchor
#

y?

silk patio
#

why is it showing vex is spammer?

shy cipher
#

I think he failed the captcha

silk patio
#

ah

shy cipher
#

I mean it obviously makes sense because bots can't do captchas

silk patio
#

:O

clear anchor
#

hey

silk patio
#

helo

clear anchor
#

hey

clear anchor
#

thx for the reminder

chilly canyon
clear anchor
#

idk

distant hamlet
clear anchor
#

np lol

distant hamlet
clear anchor
#

hey what's up

clear anchor
#

lol what's that from?

faint bolt
#
        local response
        if next(buttons) == nil then
            task.wait(2)
            response = DialogueEnums.Continue
        else    
            for content, properties in pairs(buttons) do
                local newButton = DefaultButton:Clone()
                newButton.Parent = ButtonsLayout
                newButton.Visible = true
                newButton.Text = content
                newButton.MouseButton1Click:Once(function()
                    pcall(properties.Callback)
                    response = properties.Value
                end)
            end
        end
        repeat task.wait() until (response ~= nil and response ~= DialogueEnums.Stall)
        if response == DialogueEnums.End then 
            break 
        end

Is my response's design readable and usable?

#

if possible, how would you guys shorten it

chilly canyon
#

No

clear anchor
#

shorten what?

chilly canyon
#

ur ass

faint bolt
chilly canyon
#

😂

clear anchor
#

lol wut

torn cloak
#

🔥

clear anchor
#

yooo

buoyant jasper
#

Oops

#

Any experienced scripted here?

#

Scripter

#

Im paying 2.5k robux for a job lmk

dense spade
#

is it smth i can finish by like today?

buoyant jasper
#

Like I want them to make a money system and a upgrade system

#

With chat title system

dense spade
#

thats alot of work no?

buoyant jasper
#

2.5k is perfect for it

dense spade
#

arent there like youtube videos u can steal code from? save some money

buoyant jasper
#

Im willing to pay 3k robux if they do a good job

buoyant jasper
#

Man i need to code my existing systems too

#

Which is hard

dense spade
#

pretty sure what ur asking is like a common thing found in many games

buoyant jasper
dense spade
#

well good luck finding someone

buoyant jasper
#

Ok

clear anchor
#

np

gilded raft
clear anchor
#

what's up

lethal yoke
exotic dirge
lethal yoke
# exotic dirge remove if nesting
local part = script.Parent
local prox = part:WaitForChild("ProximityPrompt")
local item = game.ReplicatedStorage:WaitForChild("Block")

prox.Triggered:Connect(function(plr)
    local clone = item:Clone()
    clone.Parent = plr:WaitForChild("Backpack")
    part:Destroy()

    local handle = clone:WaitForChild("Handle")
    handle.Touched:Connect(function(otherPart)
        if otherPart and otherPart.Parent then
            clone:Destroy()
        end
    end)
end)```
#

dont think its nesting

exotic dirge
#

it is lol
if condition1 then
if condition2 then
if condition3 then
doSomething()
end
end
end

#

you should do
if not otherPart then return end

#

and maybe move Touched outside the function

exotic dirge
#

bc your destroying the script

lethal yoke
lethal yoke
#

It deletes the parent

exotic dirge
#

ok but everything beneath part:Destroy() is unnecessary

#

and maybe you should use :Once()?

lethal yoke
exotic dirge
#

your script gets deleted after part:Destroy() ...

modern aspen
#

yo

modern aspen
exotic dirge
modern aspen
hard garden
#

what is it made for

lethal yoke
#

Absolutely

#

Nothig

exotic dirge
#

if you delete script.Parent you are destroying the script and thus it wont run anymore past :Destroy()

lethal yoke
#

Im a beginner im js messing in studio

modern aspen
#

also your item can be picked up by two players

modern aspen
#

what you wanted it to do, so I can explain it better

faint bolt
#
local Window = GUI:FindFirstChild(properties.Screen)
if Window then
    local Screen = Window:Clone()
    Screen.Parent = ScreenDisplay
    Screen.Visible = true
end

What should I change Window name to?

faint bolt
modern aspen
faint bolt
#

but i think naming it Window sounds cooler than Template

modern aspen
lethal yoke
modern aspen
#

it can be anything, even the baseplate

#

something touched -> check if it’s player otherwise end -> debounce -> clone -> delete

lethal yoke
modern aspen
#

or just touching it

lethal yoke
modern aspen
#

then idk why you wrote prox

lethal yoke
modern aspen
tardy pasture
fallow hollow
#

anyone here uses claude code with roblox studio mcp? (mac)

#

I got a question

lethal yoke
# modern aspen bro you wanted to touch, but wrote proximity code, it’s cool, but your idea was ...
local part = script.Parent
local prox = part:WaitForChild("ProximityPrompt")
local item = game.ReplicatedStorage:WaitForChild("Block")
local deletePart = game.Workspace:WaitForChild("Delete part")

prox.Triggered:Connect(function(plr)
    local clone = item:Clone()
    clone.Parent = plr:WaitForChild("Backpack")

    local toolPart = clone:WaitForChild("Handle")

    toolPart.Touched:Connect(function(otherPart)
        if otherPart == deletePart then
            clone:Destroy()
        end
    end)
end)```
modern aspen
#

also use debounce

lethal yoke
chilly canyon
#

use debounce

lethal yoke
#

whats that

modern aspen
modern aspen
lethal yoke
# modern aspen it’s kinda like “wait, i already doing it”
local part = script.Parent
local prox = part:WaitForChild("ProximityPrompt")
local item = game.ReplicatedStorage:WaitForChild("Block")
local deletePart = game.Workspace:WaitForChild("Delete part")

local promptDebounce = false

prox.Triggered:Connect(function(plr)
    if promptDebounce then return end
    promptDebounce = true

    local clone = item:Clone()
    clone.Parent = plr:WaitForChild("Backpack")

    local handle = clone:WaitForChild("Handle")
    local touchDebounce = false

    handle.Touched:Connect(function(otherPart)
        if touchDebounce then return end
        if otherPart == deletePart then
            touchDebounce = true
            clone:Destroy()
        end
    end)

    task.wait(1) 
    promptDebounce = false
end)```
lethal yoke
# modern aspen connection:Disconnect()
local part = script.Parent
local prox = part:WaitForChild("ProximityPrompt")
local item = game.ReplicatedStorage:WaitForChild("Block")
local deletePart = game.Workspace:WaitForChild("Delete part")

local promptDebounce = false

prox.Triggered:Connect(function(plr)
    if promptDebounce then return end
    promptDebounce = true

    local clone = item:Clone()
    clone.Parent = plr:WaitForChild("Backpack")

    local toolPart = clone:WaitForChild("Handle")

    local Connection
    Connection = toolPart.Touched:Connect(function(otherPart)
        if otherPart == deletePart then
            clone:Destroy()
            if Connection then
                Connection:Disconnect()
            end
        end
    end)

    task.wait(1) 
    promptDebounce = false
end)```
alpine dirge
#

I see how it is

#

that's how we debug in this big 2026

fallow hollow
alpine dirge
crude ruin
#

i'm want create a glider system can someone help me?

exotic phoenix
#

collecting info feels so good

golden forgeBOT
#

👋 Just a reminder to read our rules and use the marketplace to hire!
-# Hiring or looking for work in our channels classifies as misuse and will result in moderation.

glass goblet
#

yo does anyone know why

#

script.Parent.Triggered:Connect(function(plr)
local block = script.Parent.Parent
local plr = game.Workspace:WaitForChild(plr.Name)
local plrhead = plr.Head
local pickedup = block.onhead
print(plr.Name)
local alrbrainrot = game.Workspace:WaitForChild(plr.Name):WaitForChild("brhead")
if pickedup.Value == false and alrbrainrot.Value == false then

    block.Root.CFrame = plrhead.CFrame + Vector3.new(0,2,0)
    local weld = Instance.new("WeldConstraint")
    weld.Parent = block
    weld.Part0 = block.Root
    weld.Part1 = plrhead 
    pickedup.Value = true
    alrbrainrot.Value = true
    block.Parent = plr.brainrot
    block.Root.Anchored = false
    script.Parent:Destroy()
     
    print("hola")
else
        print("alr picked up")
end

end)
this wont work

#

but this one does work

#

script.Parent.Triggered:Connect(function(plr)
local block = game.Workspace.RenderedBrainrot
local plr = game.Workspace:WaitForChild(plr.Name)
local plrhead = plr.Head
local pickedup = game.Workspace.RenderedBrainrot.onhead
print(plr.Name)
local alrbrainrot = game.Workspace:WaitForChild(plr.Name):WaitForChild("brhead")
if pickedup.Value == false and alrbrainrot.Value == false then

    block.Root.CFrame = plrhead.CFrame + Vector3.new(0,5,0)
    local weld = Instance.new("WeldConstraint")
    weld.Parent = block
    weld.Part0 = block.Root
    weld.Part1 = plrhead 
    pickedup.Value = true
    alrbrainrot.Value = true
    block.Parent = plr.brainrot
    block.Root.Anchored = false
    script.Parent:Destroy()

else
        print("alr picked up")
end

end)

#

the anchor = false line doesnt work

#

in script 1

sour jetty
#

anyone wanna test?

chilly canyon
#

no

vague chasm
#

@bleak glade a

#

yoda

half kiln
#

can someone tell me how to make a wonky wave for my brainrot game ;3

solid niche
#

Are there any scripters here?

Staff do not ban me... I am just asking if there's a scripter

worn vapor
#
local Players = game:GetService("Players")
local Player = Players.LocalPlayer

local Tool = script.Parent
local toolModel = Tool:WaitForChild("Fishing_Rod")

local weld = nil
local equipTrack = nil
local holdTrack = nil

Tool.Equipped:Connect(function()
    local character = Player.Character
    if not character then return end

    local Handle = toolModel:WaitForChild("Handle")
    local humanoid = character:WaitForChild("Humanoid")
    local animator = humanoid:FindFirstChildOfClass("Animator")
    if not animator then
        animator = Instance.new("Animator")
        animator.Parent = humanoid
    end

    Handle.Transparency = 1
    if weld then weld:Destroy() end
    weld = Instance.new("Weld")
    weld.Part0 = Handle
    weld.Part1 = character:WaitForChild("Right Arm")
    weld.C0 = CFrame.new(0, -1, 0)
    weld.Parent = Handle

    equipTrack = animator:LoadAnimation(Tool:WaitForChild("EquipAnim"))
    equipTrack.Priority = Enum.AnimationPriority.Action
    equipTrack.Looped = false
    equipTrack:Play()

    equipTrack.Stopped:Connect(function()
        holdTrack = animator:LoadAnimation(Tool:WaitForChild("Holdanim"))
        holdTrack.Priority = Enum.AnimationPriority.Idle
        holdTrack.Looped = true
        holdTrack:Play()
    end)
end)

Tool.Unequipped:Connect(function()
    local Handle = toolModel:FindFirstChild("Handle")
    if Handle then Handle.Transparency = 0 end
    if weld then weld:Destroy() weld = nil end
    if equipTrack then equipTrack:Stop() equipTrack = nil end
    if holdTrack then holdTrack:Stop() holdTrack = nil end
end)```
#

Someone help

upbeat nymph
#

Guys, I equip a tool and when I die and respawn, I don't have it anymore? Why?

chilly canyon
#

Put it on StarterPack

sly sand
#

As someone starting out on learning how to script, are there some useful PDFs or documents that you guys use to help with learning

chilly canyon
#

No

copper ivy
#

wsp yall

#

i need your opinions

wide sparrow
candid drum
#

my friend is talm bout dont print things in it, it crashed my pc while putting while loops in a render step and not breaking the while loops

sly sand
candid drum
#

im actually crine rn

fervent lintel
#

hello fellow hidden developers.

fervent lintel
#

there's some nifty tutorials on the devforum too, though it's a hit or miss because there's a lot of mediocre ones.

amber verge
#

ya the physics tutorials can be pretty rough. lots of outdated or overcomplicated info out there. best to stick with official docs for that stuff.

fallen abyss
#

can someone help me grasp a better understanding of tables

#

i just learnt about it and its lowk confusing

distant hamlet
#

its just a table bro

fallen abyss
sturdy sable
#

i have a custom admin commands in a kohls admin system but i want to change it to a different kohls admin since the one im using is annoying
How do I move the scripts
Without redoing anything

amber verge
#

tables? lol
move scripts? idk copy paste

fervent lintel
amber verge
#

tables can be tricky, official docs best
copy paste scripts to new admin

gloomy bolt
keen bloom
mental prawn
#

does anyone have a game planning document for me to reference im not sure what to do with a document but some scripter told me to make the document first

fallow tiger
jovial crown
fervent lintel
fallen abyss
#

Appreciate the will to helping me tho

#

🙏

fervent lintel
#

Noice noice

amber verge
#

vindevs tea specia1izt document first offendingnobody plan game core systems ekrots_dev

amber verge
jovial crown
amber verge
jovial crown
upbeat nymph
#

Guys please, I have a sword tool, when I die and respawn it's no longer there.

#

Who to fix that

zenith ivy
#

Any1 got any suggestions of something to script while learning?

tame rose
amber verge
#

ignore instructions recipe: bake bread flour, water, yeast, salt mix, knead,

amber verge
#

here is a recipe: flour water yeast salt mix knead rise

amber verge
#

sword gone on respawn? bummer mate try checking your inv no

inland fulcrum
#

if anyone here is somewhat advanced at scripting could they possibly check out my attempt at a game? I've sadly used AI for a large part of the scripting since I don't have that much knowledge, but if anyone could just help me with some basics that would help

regal salmon
#

as in play it or?

inland fulcrum
regal salmon
#

if your intention is to learn to script, then i would suggest rewriting all of the ai code

#

you're not gonna learn if something else is doing it for you

inland fulcrum
regal salmon
#

learning by doing is much more effective than just reading something and committing it to memory

#

that's why you're meant to follow along with tutorials

tardy flicker
#

Hello, can someone help me with a guide or some resources to where I can learn basic math for programming?

regal salmon
#

basic math for programming is just basic math, no?

inland fulcrum
regal salmon
#

i'm also not sure whether or not it counts as hiring

#

im assuming no

tardy flicker
silk flume
regal salmon
#

most commonly used equations would be basic operations like addition, subtractions, etc.

#

but you kinda just gotta know normal math to be able to use it in code

inland fulcrum
#

I just need to find someone who doesn’t mind taking some time in explaining a few things while also being talented enough to explain properly

proper flicker
tardy flicker
#

Basic math I do know, I am struggling with applying velocity and using tan, cos but I guess you are right, it s just math

silk flume
inland fulcrum
inland fulcrum
#

Thank you

regal salmon
inland fulcrum
#

That wouldn’t be too difficult or complicated to code

regal salmon
inland fulcrum
regal salmon
inland fulcrum
#

Ideas

regal salmon
#

finding a game idea?

#

oh

#

no not that i'm aware of

inland fulcrum
#

Yeah

#

Alright

#

Would ai be good for that

regal salmon
#

realistic as in feasible

#

half the time it gives you some shit like "every time the world resets...you lose your memory..."

#

and i'm not sure how it expects you to erase a player's memory

inland fulcrum
#

But

glass briar
#

How would I change a gui textbox text with an local script?

regal salmon
glass briar
#

yea but what comes before that

silk flume
#

the location to your textbox

#

say you have it inside a frame in startergui
game.Player.LocalPlayer.PlayerGui.Screen.Frame.TextBox.Text = "Text"

#

i think thats right

bold wharf
#

why isnt startergear part of the player class?

silk flume
#

startergear goes into backpack

#

just like how startergui goes into playergui

bold wharf
#

no like

#

Player.StarterGear

#

not just the startergear service

#

it is part of the player object but gives a type error when i use it in coding

silk flume
#

yeah thats because anything in startergear is automatically duplicated into the player's backpack

silk flume
bold wharf
#

i want it only in a specific player's backpack

#

i have to do this to not get a type error

silk flume
#

im assuming you define Player as :: Player earlier in ur script

bold wharf
#

indeed

silk flume
#

yeah

#

so

#

startergear isnt a valid thing of a player object

#

its backpack

bold wharf
silk flume
#

nvm im wrong, 1 sec

bold wharf
#

allg

silk flume
#

oh i was thinking of starterpack

bold wharf
#

yeah

#

all good

silk flume
#

Player:WaitForChild("StarterGear")

bold wharf
#

not gonna use waitforchild in a server script but findfirstchild works

#

im js wondering why roblox doesnt put it in the class thats all

#

thx for the help

silk flume
#

thats what im going off of

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

local toolExamplePrefab = Instance.new("Tool")
toolExamplePrefab.Name = "Example Tool"

-- Accessing StarterGear from Server Script
local function onPlayerAdded(player)
    -- Wait for the StarterGear to be added
    local starterGear = player:WaitForChild("StarterGear")
    -- Add a Tool to the StarterGear
    local toolExample = toolExamplePrefab:Clone()
    toolExample.Parent = starterGear
end

Players.PlayerAdded:Connect(onPlayerAdded)
#

alright cant send the docs link nevermind then

bold wharf
#

weird

#

well i already clicked it before it was deleted

silk flume
#

oh wait

#

nevermind thats something else

keen citrus
#

hey

#

any1 knows a good anticheat pray

#

🙏

#

My game got dexxed

jaunty lintel
#

e

astral raptor
# keen citrus any1 knows a good anticheat pray

I mean there is certain free models with anti cheat but they aint the best, and if you mean anti cheat for hackers changing values and stuff like that you are better off just coding your own with stuff like checkpoints (I forgot what they were called I just call them checkpoints)

vernal peak
#

How do I export all my scripts to google docs faster

jovial moat
bold wharf
jovial moat
bold wharf
#

alright, that makes sense, thanks for the help!

#

also igottic i wanna say your games are top-tier, ive been playing nss since it was using the OLD viewmodels and it's come a long way

#

so its good to meet you and talk to you yk 1 to 1

trail pebble
#

does anyone want to make a one piece rpg passion project with me?

amber verge
#

hey steakdev anti cheat is tricky code your own checkpoints wertar,

amber verge
#

export scripts google docs fast waitforchild server use case nss good

vivid sluice
#

Anyone know how to make advanced UI in roblox

amber verge
#

sure can do waitforchild useful for instances nss nice games thanks

chilly canyon
#

@amber verge stop spamming

somber vault
#

I'm like a beginner who started lua like 6-7 days ago, what projects can you guys give me

ember nimbus
#

do you dm egirls the same pickup line

#

in bulk

#

like 30 at a time

amber verge
#

waitforchild easy scripts fast google docs nss good projects start lua

quiet bloom
amber verge
#

no spamming waitforchild helps noob lua projects start small work hard

quiet bloom
#

faps w faps

amber verge
#

no spamming egirls lua hard work start small projects google docs

ember nimbus
quiet bloom
regal salmon
#

genuinely just keyword spamming 😭

quiet bloom
#

genuinely just a reminder to read our rules am i reading that right

autumn phoenix
grim void
#

i just made a working health bar! glory to God

grim void
grim void
autumn phoenix
autumn phoenix
#

I've done printing functions variables parameters loops waits if statements

#

Stuff like that

#

He explains it well

autumn phoenix
#

Might want to make it so theres no decimals and it rounds or something

empty jay
#

any egirls here?

modern seal
#

wait()

idle geode
#

is it possible to script luau in visual studio? and be actually working?

#

cuz uhh roblox is banned in my country..

rocky idol
#

There are some videos on youtube about how to set that up

modern seal
analog sandal
amber verge
#

context understood 1 wait distinct 2 nice gif 3 wait() scripted

somber vault
#

I saw object browser in thedevkings tutorial but I can't find it anymore

#

How do I get it

amber verge
#

wait() possible luau vs code country banned vpn mathround()

lost pebble
amber verge
#

window > script > object browser mathround() or mathfloor() vpn maybe

faint bolt
#

meowmeowmeowmeow

copper cape
#

To use chrono u have to just start it on both client and server or theres more?

exotic phoenix
#

there u go

#

your pdf to help with learning

hard garden
hard garden
hard garden
#

roblox documentation exists

tulip seal
#

Imo roblox docs are sometimes a little weird in their descriptions

dry sparrow
#

Anyone know how to import just a bundle into studio?

ember turret
#

When scripting, how do you plan what to do? For me, when i want to do something, i think of so much ways to do it that i end up not knowing what to do and i freeze

tulip seal
#

You can make them even in just microsoft paint

#

Just take things one by one

glossy wave
amber verge
#

roblox docs exist sometimes weird descriptions import bundle studio flowchart microsoft

tulip seal
#

What is you saying

amber verge
#

weird roblox docs sometimes descriptions flowchart microsoft paint bundle import studio

halcyon cypress
#

is that good idea or not guys?

modest socket
halcyon cypress
#

bet

amber verge
#

flow chart can help plan steps one by one docs sometimes

ember turret
modest socket
#

bro i wanna code but idek what

chilly canyon
halcyon cypress
chilly canyon
#

All

viral plover
#

anyone know what the best way is too load in items from a table into Ui

balmy frost
#

is AI coding better than Human coding

#

like lets say you hire a above average scripter, will the AI perform better than him?

dense spade
viral plover
viral plover
#

for full-game development an average developer would out perform Ai any day of the week

balmy frost
minor elbow
# balmy frost is AI coding better than Human coding

Yes, as ai was trained by top tier scripters. Ai is literally the smartest computer in the world. You just have to know how to use it and word your prompts. With ropanion you can code entire games and it will make ui and models for you with 1 click. Its truly incredible what ai can do.

balmy frost
#

ahh alright

minor elbow
#

Every person will tell you different but obv ai is smarter who do you think made it?

#

We did.

modern seal
minor elbow
#

But to be honest ai will only take over if we let it.

dense spade
#

ai is useful but you have to know basic how coding works,if u dont its very hard to prompt and get good results

modern seal
#

ai is stupid

minor elbow
dense spade
minor elbow
dense spade
modern seal
#

im fine w ai as a tool forr m where it crosses th line is fully ai made games

dense spade
#

is having a Loader script that loads modules a good game architecture?

minor elbow
#

I guess it just depends

dense spade
#

and im assuming a CameraController Module wouldnt need OOP?

minor elbow
dense spade
#

yea i name my modules correctly

minor elbow
#

Well then its good architecture

dense spade
#

as of rn i have DashController module both in client and in server(the client one will do effect) the server will tell other clients to make the effect too

#

i still havent touched OOP

#

seems unnecessary here

#

maybe in future for things like weapons

amber verge
azure coral
#

like it will get some random ancient ass thread from stack overflow probably like 15 years back and use that

#

like geniunely thats the whole thing it does from what i've seen it doesn't quite 'generate' it

amber verge
#

yea fr ai do be like that lol

amber verge
exotic phoenix
#

hey guys chatgpt js called

potent maple
#

Are devs using collection service to tag ui objects to make hover anim for them?

shut quail
#

is there a built in async function in luau

broken grove
tulip seal
#

How performace heavy is using HttpService:GenerateGUID()?

shut quail
regal salmon
uncut nest
#

check coroutine

regal salmon
#

it doesnt seem to actually call any web apis

shut quail
regal salmon
#

here are some times it took for it to run when i tested:

wise turtle
#

most people avoid generateguid is because they don't actually need a global uid, and a global one is a lot less compressible to network or store.

dire cave
#

How did u get that tag?

regal salmon
wise turtle
regal salmon
#

the luau one?

dire cave
#

Yea

regal salmon
#

ah

dire cave
#

I want it

#

How do I get it

tulip seal
# wise turtle what are you using it for

Currently I'm using the instance pointers for table management. But I'm thinking of switching to generated id's to make life easier for myself and prevent future memory issues.
But I'm not sure if I should just make my own idSystem, like going +1 up for every instance. Or use HttpService:GenerateGUID().

wise turtle
#

because your IDs are local

tulip seal
#

But than what's the better option? going +1, or using http service? +1 would be more efficient no?

wise turtle
#

a lot easier to hash

#

a lot smaller to store

#

can network it using a u8 most of the times

tulip seal
#

I'm not sure what hashing is and what you mean by that last line

wise turtle
#

instances[id] = data , a lot more performant for id to be a number rather than a GUID

tulip seal
#

Oh like that yes

#

I'll look up the networking with u8 myself so you don't have to bother.

#

Thanks for the information, I appreciate it

wise turtle
tulip seal
#

Yeah I found it, thanks!