#code-discussion

1 messages · Page 3 of 1

austere raft
#

@green tangle

#

? You posted a reaction 💀

green tangle
#

?

tiny obsidian
#

chat tags with textchatservice are made on clients now but do they replicate to everyone? like does everyone see them or only that client

gritty elm
#

Lol

#

Lol

gilded shard
#

that newish audio api & associated instances

#

realistic two-way repeated infrastructure/subscriber??? potential

#

ray casting to simulate vhf/uhf wave propagation 🥺

#

you can do it

#

and the property in audolistener is pretty much a talkgroup

carmine yacht
#

why

lucid blade
#

So I've been wondering for a while how pls donate can have 2 leaderboards which 4 different time periods, essentially 8 leaderboards without hitting datastore limits. I can't even have 2 datastores working at once, let alone 8

carmine yacht
#

@tacit tendon if you use modules i think you can also return typechecked table in general

carmine yacht
lucid blade
carmine yacht
#

they have intervals and they update the data on leave/every few active minutes

#

also having a data module really helps

lucid blade
#

Oh

carmine yacht
#

because you can integrate your global updating into them

#

something like profiles

lucid blade
#

So I should migrate to profilestore?

void stone
#

For some flipping reason the main menu gui cam doesnt work help me plz

elfin nimbus
#

Is it better to overwrite the players animate script animation ID if I have a different idle animation depending on which tool is being used or should I store an animation for each tool and whenever the tool is used have it run that animation

mental hawk
trail turtle
#

How to add run animation

mental hawk
#

limit gets increased off how many players

#

are in your game

sinful dune
#

How to rotate three axes of a part relative to an axis (axis for this case is the displacement between the part and another part)

#

I know about CFrame.fromAxis but I'm unsure on the usage of it in this context

silk cargo
#

the script is not complete

regal reef
median fable
#

and yeah ik

silk cargo
#

where do u live?

#

1am?

median fable
#

?

silk cargo
#

what is ur timezone

median fable
#

nvm 8

#

i made the script at 1am talked about it at 8

#

dw

silk cargo
#

wow

fallen summit
#

can someone help me make my camera orbit around this part, its currently stuck like this

#

i want it so when you move the mouse the camera orbits the part

fallen summit
#

others the body

viral lynx
#

is someone able to make a shop gui system:

  • Just make a boxing glove that can knockback people. and make it so i can customize how far it can knockback.
  • Make it cost money in the gui. i alr got the currency set up.
  • make some kind of armor that has a percentage of resistance against knockbacks. (in shop)
    -# gui can look as ugly as u want as it isnt your profession.

and lmk if you can make gamepasses that do stuff.
for ex: infinite knockback glove, or skip obby, and so on

#

i pay in paypal

#

im just posting here just in case anyone is intersted

sturdy plume
#

how do i make it so whenever the stun attribute is set to true, it stops player from being able to m1?
i've tried if stunned == true then return end, the attribute is being set to true aswell so it cant be that

lofty parrot
sturdy plume
# lofty parrot Show the code

server

local RP = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")

--// Folders //--
local Events = RP.Events
local SFX = RP.SFX
local VFX = RP.VFX
--// Sounds //--
local swingSound = SFX:WaitForChild("Swing")
local hitSound = SFX:WaitForChild("Hit")

--// Events //--
local CombatEvent = Events:WaitForChild("CBEvent")
--// Modules //--
local hitboxModule = require(RP.Modules.MuchachoHitbox)
local combatFramework = require(RP.Modules.CombatFramework)
--// Variables //--
local FIST_DMG = combatFramework.COMBAT_ATTRIBUTES.FIST_DMG
local FIST_CD = combatFramework.COMBAT_ATTRIBUTES.FIST_CD

local STUN_M1_TIME = combatFramework.COMBAT_ATTRIBUTES.M1_STUN_TIME

--// ------- //--

Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(char)
        --// Apply Attributes //--
        char:SetAttribute("Combo", 1)
        char:SetAttribute("Stunned", false)
        char:SetAttribute("Blocking", false)
        char:SetAttribute("StatusEffect", "N/A")
        
        --// Weapon System //--
        char:SetAttribute("currentWeapon", "N/A")
        char:SetAttribute("Bleeding", false)
    end)
end)

--// Server to Local //--
CombatEvent.OnServerEvent:Connect(function(player)
    
    --// Variables //--
    local char = player.Character or player.CharacterAdded:Wait()
    
    --// Attributes //--
    local combo = char:GetAttribute("Combo")
    
    --// Sound Handling //--
    swingSound:Play()
    
    --// Handling Hitboxes //--
    local hitbox = hitboxModule.CreateHitbox()
    
    local params = OverlapParams.new()
    params.FilterType = Enum.RaycastFilterType.Exclude
    params.FilterDescendantsInstances = {char}
    
    hitbox.Size = Vector3.new(4,4,6)
    hitbox.CFrame = char.HumanoidRootPart
    hitbox.Offset = CFrame.new(0,0,-2)
    hitbox.Visualizer = false
    hitbox.OverlapParams = params
    
    hitbox.Touched:Connect(function(hit, hum)
        --// Enemy Animations //--
        local hitAnimation = RP.Animations.Hit
        local hitT = hit.Parent.Humanoid:LoadAnimation(hitAnimation)
        
        hitT:Play()
        
        --// VFX Handler //--
        local highlight = VFX:WaitForChild("Highlight")
        local clonedHighlight = highlight:Clone()
        local hitVFX = VFX:WaitForChild("HitVFX")
        local clonedVFX = hitVFX:Clone()
        
        clonedHighlight.Parent = hit.Parent
        clonedVFX.Parent = hit.Parent.HumanoidRootPart
        clonedVFX.CFrame = hit.Parent.HumanoidRootPart.CFrame - Vector3.new(0,0,-2)
        game.Debris:AddItem(clonedVFX, 0.5)
        game.Debris:AddItem(clonedHighlight, 0.6)
        --// Knockback Handler //--

        local BV = Instance.new("BodyVelocity")

        BV.P = math.huge
        BV.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
        BV.Velocity = char.HumanoidRootPart.CFrame.LookVector * 9
        BV.Parent = hit.Parent.HumanoidRootPart
        
        game.Debris:AddItem(BV, 0.1)
        
        --// Damage Handler //--
        hum:TakeDamage(FIST_DMG)
        
        --// Sound Handler //--
        swingSound:Stop()
        hitSound:Play()
        
        local stunned = char:GetAttribute("Stunned")
        
        --// Stun Handler //--
        hit.Parent:SetAttribute("Stunned", true)
        hit.Parent.Humanoid.WalkSpeed = 0
        hit.Parent.Humanoid.JumpPower = 0
        task.wait(STUN_M1_TIME)
        hit.Parent:SetAttribute("Stunned", false)
        hit.Parent.Humanoid.WalkSpeed = 16
        hit.Parent.Humanoid.JumpPower = 50
        
    end)
    task.spawn(function()
        hitbox:Start()
        char.Humanoid.WalkSpeed = 8
        char.Humanoid.JumpPower = 0
        task.wait(FIST_CD)
        char.Humanoid.WalkSpeed = 16
        char.Humanoid.JumpPower = 50
        hitbox:Stop()
    end)
    
end)```
#

client

local RP = game:GetService("ReplicatedStorage")
local uis = game:GetService("UserInputService")

--// Folders //--
local Events = RP.Events
local Animations = RP.Animations

--// Events //--
local CombatEvent = Events:WaitForChild("CBEvent")
--// Variables //--
local player = game.Players.LocalPlayer
local char = player.Character or player.CharacterAdded:Wait()
--// Attributes //--
local stunned = char:GetAttribute("Stunned")
local combo = char:GetAttribute("Combo")

--// Animations //--
local m1_one = RP.Animations["1"]
local m1_two = RP.Animations["2"]
local m1_three = RP.Animations["3"]
local m1_four = RP.Animations["4"]
--// Enemy Animations //--
local hitAnimation = RP.Animations.Hit

-- // Tracks //-
local m1oneT = char.Humanoid:LoadAnimation(m1_one)
local m1twoT = char.Humanoid:LoadAnimation(m1_two)
local m1threeT = char.Humanoid:LoadAnimation(m1_three)
local m1fourT = char.Humanoid:LoadAnimation(m1_four)
local hitT = char.Humanoid:LoadAnimation(hitAnimation)

--// -- //--

local debounce = {}

uis.InputEnded:Connect(function(input, isTyping)
    if isTyping then return end
    
    if (table.find(debounce, player.UserId)) then return end
    if input.UserInputType == Enum.UserInputType.MouseButton1 then
        if stunned == true then return end
        table.insert(debounce, player.UserId)    
        
        combo = combo + 1
        
        if combo == 1 then
            m1oneT:Play()
        elseif combo == 2 then
            m1twoT:Play()
        elseif combo == 3 then
            m1threeT:Play()
            task.wait(0.3)
            combo = 0
        elseif combo == 0 then
            m1fourT:Play()
        end
        
        CombatEvent:FireServer("Connected..")
        
        task.wait(0.7)
        table.remove(debounce, table.find(debounce, player.UserId))
    end
end)```
lofty parrot
#

So if stunned was false when the script started, then it'll remain false

#

What you need to do is check the attribute

#

So,

if Character:GetAttribute("Stunned") then
  return
end
#

Instead of if stunned == true then return end

sturdy plume
#

yo thanks it works

signal shoal
#

does anyone have the model for a claim ugc

#

me and my friend made a game but we wanna make it more "time well spent" by making it so after playing the game for 45 minutes u get a free ugc

#

i already have the ugc file ready and can upload it to roblox but I want the gui that makes u wait 45 min and then lets u claim 1 copy of the lim

#

ive searched youtube and asked others but found nothing

bleak topaz
#

aight

#

which one is better for yall?

#

which function is objectively better

#

for grabbing a random block

pearl dock
#

Anyone know how to start learning scripting from scratch? (Complete beginner)

wintry oriole
pearl dock
#

Tyy

wintry oriole
#

and roblox documents

#

yt can help too

dusky imp
slate helm
dusky imp
#

And I struggled a bit with this xd

hardy pilot
dusky imp
#

I'm thinking about revive coming out from the side and death note coming from the top

dusky imp
bleak glade
#

best way to add in a zoom feature? i thought about lerping to an aim part or adding a zoom animation but idk whats better

rustic wharf
#

Who's an expert scripter here

dark juniper
rustic wharf
#

Need to ask a question to someone very experienced

dark juniper
rustic wharf
#
local Scripts_Folder = replicatedStorage:WaitForChild('Scripts_Folder')
local Module_Scripts_Folder = Scripts_Folder:WaitForChild('ModuleScripts_Folder')
local CarrotCake_ModuleScript = require(Module_Scripts_Folder:WaitForChild('CarrotCake_ModuleScript'))```
#

Is this too many WaitForChild()

dark juniper
#

this is NOT a question for a very experienced person

#

also you do not need to put the wait for child in the require

#

I’ve never seen a scripter do that in my life

rustic wharf
#

It is

dark juniper
#

Deadass I’ve looked at so much code

rustic wharf
#

This is in a local script

dark juniper
#

I’ve never seen wait for child in require

#

You might be cooked…

rustic wharf
placid agate
#

you should not be using WaitForChild unless this script is running before game.Loaded is fired.

rustic wharf
#

You might be cooked instead

dark juniper
#

💔

rustic wharf
#

And I just told you

#

It's in a local script

dark juniper
#

I’d consider your point if it was valid

#

But gang

rustic wharf
#

And the module script is inside replicated storage

dark juniper
#

This is not it

rustic wharf
#

It may not exist when you require it

dark juniper
#

Yes!!! You don’t need to call wait for child in require if it’s in rep store

#

Everything else is fine

#

But you can’t put the wait for child in require that doesn’t make any sense

rustic wharf
#

The module script may not have replicated yet

#

So you do need to use WaitForChild()

dark juniper
#

💀 Roblox handles it

#

Show me this error

placid agate
#

rex it's ragebait.

dark juniper
#

I’m getting rage baited so hard

#

Deadass

rustic wharf
#

Everything is rage bait to you kids

dark juniper
#

There’s no way this guy is this gullible

#

😭

#

Holy shit he actually believes you can put wait for child inside of require

rustic wharf
#

I think you guys are wrong and ChatGPTs right

#

I understand the reasoning of ChatGPT and it's the reason I asked it in the first place

dark juniper
#

gang ChatGPT is not an omnipotent god

#

It doesn’t know the answer to everything

rustic wharf
#

The module script isn't in serverscriptservice

#

It's in replicated storage

dark juniper
#

Man I’m just gonna block you

#

Your a lost cause

rustic wharf
#

If you're an experienced expert scripter @ me or reply to this for a question I have

placid agate
#

thelast, this is just sad... c'mon man you're better than this.

gleaming ivy
#

just remember u can gaslight gpt into thinking 2 + 2 = 5

jovial whale
#

thumbsup Make sure to read documentations from time to time!

#

I remember AI giving me functions in Roblox that never existed

slim egret
#

take this as you will @rustic wharf

languid canopy
#

wait this is discussion mb

somber vault
#

I need help, I need to save up cash but I don't know any scripting and i want to earn money from scripting. Can anyone please help

rustic wharf
#
if isPressing and os.time() < maxDuration then
    print('Debug 1')
    for i, v in pairs(game.Players:GetPlayers()) do
        local targetCharacter = v.Character
        if not targetCharacter then return end
        if character == targetCharacter then continue end
        local targetHumanoidRootPart = targetCharacter:FindFirstChild('HumanoidRootPart')
        if not targetHumanoidRootPart then return end

        local distance = (mouse.Hit.Position - targetHumanoidRootPart.Position).Magnitude
        if distance < shortestDistance then
            shortestDistance = distance
            nearestPlayer = v
        end
        if not isPressing then break end
    end
end```
#

Would this be correct

#

It's for my teleport ability

#

If they let go of the ability key (x) then the loop ends after 1 iteration

copper apex
#

ChatGPT sucks

plush quarry
#

why is roblox studio this trash in optimization, first it crashes because of a coding mistake i made which spam creates parts infinitely which caused a crash, then i try to open task manager to close studio, then task manager crashes, and roblox studio is still open doing nothing not closing no matter what and eating my ram (i have 16gb ram)

#

its still open just casually taking 12 gigs of ram while its doing nothing and refusing to close

#

HOLY STUDIO IS TAKING 14 GIGS RN EVERYTHING IS LAGGY I GOTTA RESTART MY PC

#

FROM 4 LINES OF CODE

tiny obsidian
#

sounds like his code and his pc and his mindset and his entire lifeline is trash

frail yarrow
random pendant
viscid canopy
plush quarry
#

while true do instance.new("Part") end

#

not even 4 lines actually

#

thats like 4 words

#

it should stop itself if someone like this happens not eat my memory to death

viscid canopy
#

how dare it not hold ur hand

#

pls never leave roblox studio

#

you will be in tears

#

💔

plush quarry
#

ok wtv but kinda crazy it took 14 gigs in like 5 mins

#

i wasent even crashing out i thought it was funny im not really complaining

viscid canopy
#

everyone knows its peak 👿

hazy leaf
#

can anyone give me some quick stuff to do? Im a beginner trying to learn

fading onyx
#

both u and ur pc

plush quarry
#

i just forgot a task.wait its not deep

fading onyx
#

how tf do u code for 5 years and forget to put task.wait 😭

#

and u still blaming roblox studio

plush quarry
#

idk it was my 800th line of code so i was brain dead

#

bro i was just laughing abt it im not even crashin out lol

#

why yall haters

fading onyx
#

HOLY HOLY STUIDO TAKE 14 GIGS 4 LIENS CODE AHH LAGGY PC PC RESTART

plush quarry
#

ye i was laughing abt it irl

#

i just used caps cus i can

fading onyx
plush quarry
#

chillout this is pissing you off real bad its just a discord chat 💔 🙏 😭 💀

#

if u just gonna argue dont reply

viscid canopy
#

dont put dirt on its name og

plush quarry
#

just stfu

viscid canopy
#

they call me the gated community demon on the streets dont get it twisted

#

👿

plush quarry
#

bro im better at studio than you anyways

placid agate
#

warmcubed is the goat

ivory matrix
#

is anyone here a good coder n not a skid im looking for someone to make a da hood game with me we will go 50/50 profit dm me if ur interested

stable verge
#

what is frameworks

dark juniper
split kayak
#

why is the player taking more damage then its suppost to? dont mind my var names

#

it takes a different amount of damage each time

somber vault
#

did you add a table for players who got hit?

#

like

local HitTable = {}

if not table.find(HitTable,hit.Parent) then
table.insert(HitTable,hit.Parent)
end
-- after it hits you can just clear the table

#

sorry if im bad at explaining lol

split kayak
#

your not

#

im just a lil confused

somber vault
#

did it work?

#

lol that's normal

#

the table stops it from hitting the player again but if you want to hit the same player again for sometime you can add a wait and clear the table

split kayak
#

well once the player gets hit it stores them but then they cant take damage again

somber vault
#

yes you can clear it if you want to take damage again

split kayak
#

let me try that

somber vault
#

cool

#

table.clear(HitTable)

split kayak
#

it works thanks so much

somber vault
#

goods

stiff ibex
#

NVRAM blacklist function (the entire list are whitelisted variables)

somber vault
#

wth

alpine pendant
#

v

#
local function nextt()
    script:Destroy()
    
    return Enum.ContextActionResult.Pass
end```
chat will this sink CAS bcs im destroying the script before returning the cas result?
dusty ravine
#

anyone have an idea for a td game im working on (themes)

inland bay
#

and just fill in some niche brain rot theme

naive forge
#

My JS bot wont wake up and i cant figure out why... is there anyone that could help? Its not putting out any errors

inland bay
#

nice one man

lean ocean
inland bay
#

this is why we use .env 😔

alpine pendant
#

i dont wanna clog up the game with scripts that are no longer in use

naive forge
inland bay
#

do you have the correct intents set

naive forge
#

@inland bay are you able to join ss

inland bay
#

ss?

naive forge
#

screenshare

inland bay
#

sure

naive forge
#

join private 2b @inland bay

lean ocean
#

If you are returning and destroying the script

inland bay
#

you dont see the vision.

old valley
#

guys can anyone help me about my code in dm i think its so little bug but code is so long i cant send here

verbal smelt
#

guys is my weighted system is good or nah ```lua
local module = {}

--
module.weights = {
["rare"] = 69,
["epic"] = 28,
["Legendary"] = 2.999,
["secret"] = 0.001
}

function module.getRandomOutcome()
local totalweights = 0
-- Calculate total weight
for _, weight in pairs(module.weights) do
totalweights = totalweights + weight
end

local randomNumber = math.random() * totalweights
local selectedOutcome


for outcome, weight in pairs(module.weights) do
    randomNumber = randomNumber - weight
    if randomNumber <= 0 then
        selectedOutcome = outcome
        break
    end
end


return selectedOutcome

end
return module

spiral oak
#

And did u try to start it with node (filename)

#

In the terminal

green tangle
# fading onyx

HOLY HOLY STUIDO TAKE 14 GIGS 4 LIENS CODE AHH LAGGY PC PC RESTART

naive forge
#

i figured it out tho

spiral oak
prime cave
#

is anyone interested in testing a brainrot toilet clicker game I scripted in 1 and a half hr? (the other 2 hrs in the challenge I used to layout the map with free models, im not that good of a builder and I was js doing this to practice scripting lol. I did make icons and thumbnail tho but those were simple and rushed in 5 mins)

indigo pewter
#

how do people make impact frames

loud stratus
#

and color corrections

indigo pewter
somber vault
#

programming nerds

nimble coral
wispy kraken
#

omg i just realised i could make my first roblox game,but i stoped like for already 6 months because of stupid school😭😭🙏

wispy kraken
prime cave
#

guys what game should I make in a day

inland bay
#

hypervisor

raven lynx
#

Hitman 3

hardy pilot
#

Like animation?

fading onyx
sullen flicker
#

How would I manipulate the camera and change it’s perspective

loud stratus
somber vault
sullen flicker
somber vault
sullen flicker
#

This is for something else, I'd like this sort of perspective

#

So some sort of bird perspective but from the side

somber vault
#

Pretty sure roblox documentation has it in it

sullen flicker
sullen flicker
#

Now if I only knew where this script goes

somber vault
sullen flicker
#

And it goes into StarterPlayerScripts, right?

somber vault
#

preferably starterplayer

sullen flicker
#

What's the difference between StarterCharachterScripts and StarterPlayerScripts

gritty fossil
somber vault
#

I think there is a setting to fix that?

#

I remember one

gritty fossil
sullen flicker
#

Ah I see

#

Thank you

#

So the StarterPlayer makes more sense yeah?

gritty fossil
#

since the camera is fixed to the character my first go-to would be a character local script

somber vault
#

I think you explained it right

gritty fossil
#

np

sullen flicker
#

My screen just goes grey now

#

Any idea why @gritty fossil @somber vault

sullen flicker
#

There's nothing in output tho

#

Is there something I need to enable on camera as well or

somber vault
sullen flicker
#

Yeah

#

Maybe it's the distance or something

#

Yeah it is

#

My bad, it was the angle

#

So the camera went in the base plate

somber vault
#

glad that you found the issue

sullen flicker
#

Thank you

somber vault
#

because I was starting to question myself how did that happen

sullen flicker
#

Although any setting I change the camera fucks up

#

And I want to zoom out the camera more

#

I can only zoom in

#

There's no way this is the maximum hahaha

somber vault
#

There should be settings you can modify in the script

sullen flicker
#

Okay I managed to fix it

#

I had to change the FOV setting

#

Although I have to change it only by bits, since the normal one was at 0.000125

#

Got it perfect now, great!

somber vault
#

Thats nice

sullen flicker
#

Now I'll try doing it so charachter follows the mouse

#

As in the direction of the mouse, movement is free of course

vague phoenix
#

Does anyone have a document link for oop idk anything about oop

strange summit
#

how do i make the segments of a beam load in faster

#

with a script

#

its really messing up the curve

mortal roost
#

Can someone say some good color combinations becouse rn the one that i chose remind me of like an ice cream cuh. so if you got any cool color combinations please say them under. Also say some thing that i should improve here

open walrus
#

is blender the only option for animating like good vfx?

winged shadow
winged shadow
open walrus
#

do u know the game

#

elemental battlegrounds?

#

or wait

winged shadow
#

y

open walrus
#

u know uh maplestorm?

#

on yt

winged shadow
open walrus
#

a roblox dev

#

he's good at vfx

#

are those blender things?

winged shadow
#

show me

open walrus
#

kidna like these

winged shadow
#

hmmm

open walrus
#

nvm i cant put yt links huh

winged shadow
#

ok

#

o_O

open walrus
#

its Maplestorm on yt

winged shadow
#

k

#

sec

open walrus
#

it says im bronze so not allowed to put links

#

;-;

winged shadow
#

uh

#

i watched a bit

#

i a wanna say, that some his vfx are garbage and some are ok

#

and animations i ve seen are all very bad

#

so idk why u like

#

wanna do like he does

#

and also

#

i didnt understand ur first question

open walrus
#

not like those

#

but i want something like that

#

so is blender the way for it?

winged shadow
#

?

open walrus
#

yeah things like those

winged shadow
#

no

open walrus
#

im just starting so i have no idea

#

then?

winged shadow
#

u can fo vfx only in studio

open walrus
#

whats blender for in roblox then?

winged shadow
#

ye, maybr u can bake some textures for some flipbooks in blender, but anyway u cant avoid using studio

winged shadow
#

and meshes for vfx

#

but in his vfx i dont see any meshes used

#

or just he uses spheres for explosions

open walrus
#

so studio is enough for those?

winged shadow
#

y

#

ill recomend u a server

#

RoVFX

#

there u can find some textures in open source channel\

open walrus
#

aight

winged shadow
#

for u vfx

#

and

#

y

#

thats all

open walrus
#

sweet thx

winged shadow
#

ty:>

jovial ice
#

quickest way to automatically redirect chat messages sent by players to the team channels instead of the gchat?

lean lark
#

:SetAttribute() on server sends data to all clients even if they dont use :GetAttribute()?

tacit sun
#

whats a good project to work on that looks good in a portfolio

lean lark
#

hm? can you explain it a bit

raw imp
#

I know there a way to override players classical clothing, is there a way to override with realistic clothing

shut sorrel
#

Put the accessories in ReplicatedStorage and clone them to the character

dense iris
#

I need something like to thia added to my already somewhat made command module

/bossbar set (The title here)

The boss bar health tracks with whoever executed the command, thus it decrease’s as the executed loses health.

shut sorrel
#

if you made the module it should be set up to easily add new commands

jovial ice
#

is there a way to bypass /t and send messages to teams chat without the need to use a command? Allowing then to send a message in global chat with something like /g instead?

night gazelle
#

Do check the TextChatService API

jovial ice
#

tried detecting message inputs and redirecting them to the team chat but didnt work
also tried disabling gchat(to later enable only when using /g before the message) but doesnt seem possible to actually do so

open walrus
#

btw

#

about client and server service in roblox

#

is there a documentation that talks about whats a server service and whats a client

#

like if starter gui and stuff are aerver or local?

night gazelle
#

@jovial ice I found this

#

Oh I can't send a link

shut sorrel
night gazelle
#

Then set the TargetTextChannel logically

jovial ice
jovial ice
#

it was this easy the whole time?

night gazelle
#

Yeah, you just need to dig deep in the API LMAO

jovial ice
night gazelle
#

Roblox has been reworking their modules so that it's easy to program and customize

jovial ice
#

never put hands on anything related to chat so quite new on that

night gazelle
shut sorrel
# open walrus oh alright

localscript only effects client like camera, inputs, and what the player can see and interact with, good for reducing lag by spawning stuff just for that player and not on the server. Server scripts is what everyone interacts with and can see changes happen all at the same time, like setting and saving data, in scripts you use remoteevents to communicate from client to server

#

just a basic overview

open walrus
#

oh kay

#

so there aint any documentations for knowing what is what really

#

gt know by urself ;-;

shut sorrel
# open walrus so there aint any documentations for knowing what is what really

https://create.roblox.com/docs/projects/client-server
https://create.roblox.com/docs/reference/engine/classes/RemoteEvent
They exist but I don't think they do very good job at explaining it for beginners, you start to get it the more stuff you make and run into little problems regarding it

An overview of the client-server model in Roblox.

An object which facilitates asynchronous, one-way communication across the
client-server boundary. Scripts firing a Class.RemoteEvent do not yield.

open walrus
#

oh alright

#

just dont know what to make yet tho

#

im just watching tutorials and doing small projects with them

#

onl including them

shut sorrel
#

that's the most important step in scripting is knowing what you want to make

open walrus
#

i needa get to using everything and make smth

open walrus
shut sorrel
#

Ye just have a rough idea of what you want and work step by step, the finished product is always worth it

#

it's quite addicting

open walrus
#

only if it works like intended ;-;

#

had to spend 4 hrs to get a remote function to work

#

made me annoyed ;-;

soft kraken
#

i was watching a scripting tutorial and got confused with "tables" like can i use tables to code a crafting recipe?

open walrus
#

xD

shut sorrel
#

failing and spending the next 3 hours fixing a simple problem is all part of the fun

open walrus
soft kraken
#

im confused

shut sorrel
#

I do use tables for crafting tables

open walrus
#

data storing and arranging type things in python

#

roblox ig looping with getchildren all i can think of

shut sorrel
#

Tables store any kind of data, very useful

soft kraken
#

multiple data too if im not wrong

shut sorrel
#

Functions, variables, objects, etc

open walrus
#

rather use list

soft kraken
#

and u can change the data inside of the table using "table." if im not wrong again

#

man scripting seems fun

open walrus
#

emphasis on "seems"

#

unless u rlly enjoy it

shut sorrel
#

You just do playerDataTable.Coins = 5 for example

open walrus
#

albino how long you been doing this for

shut sorrel
#

I recently made a whole dialogue system that uses table to store string to set up the dialogue and all the responses

#

I've been at it for 8 years

soft kraken
open walrus
#

damn

soft kraken
#

ty for your time btw

soft kraken
shut sorrel
soft kraken
#

ty for your time again

shut sorrel
#

np, it's mostly all problem solving, the more you make the more efficient you become and realize better ways to make something

open walrus
#

also is AI possible for scripting?

#

i meant for like if a player draws a dog with his mouse, i make a script to recognise if its a dog i do smth

shut sorrel
#

I used to always find open source games and look through the code people wrote when I started and did like reverse engineering and connect the dots

soft kraken
open walrus
open walrus
#

since player can draw dog anyhow

shut sorrel
soft kraken
#

seen a yt video about that

open walrus
#

shicryingdead

#

that was one idea i had

#

got to wait for that

shut sorrel
#

That's like making a neural network and training off a dataset to recognize drawings that resemble data

soft kraken
#

albino can i store skill system inside tables like in battleground games? or there is a better way doing that?

#

like when u switch over a character there will be a spesific table for that character's skills

#

oh

#

thats what im looking for

#

ty

shut sorrel
#

tables are amazing for organizing code most importantly, you can make a whole script without them but it would be a mess

#

But doing Object:GetChildren() for example creates a table of all the objects inside of the main object

soft kraken
#

indeed they are amazing and fun

#

messing with tables btw

shut sorrel
#

That's how I would add spawned npcs to the SpawnedNPC table for example to keep track of them

soft kraken
#

pretty usefull

shut sorrel
jovial ice
soft kraken
#

let me show what i learned in just 3 days

jovial ice
#

`local TCS = game:GetService("TextChatService")
local chatInputConfiguration = TCS:FindFirstChild("ChatInputBarConfiguration")
local Players = game:GetService("Players")
local Teams = game:GetService("Teams")
local redTeam = Teams:FindFirstChild("RedTeam")
local blueTeam = Teams:FindFirstChild("BlueTeam")

local function setChat(player)
if not player and not player.Team then return end
if player and player.Team then
if player.Team == redTeam then
chatInputConfiguration.TargetTextChannel:FindFirstChild("RBXTeamRed")
else if player.Team == blueTeam then
chatInputConfiguration.TargetTextChannel:FindFirstChild("RBXTeamBlue")
end
end
end
end`
this is how i tried doing it

soft kraken
#

just gimme a minute to type what i want to do

night gazelle
#
chatInputConfiguration.TargetTextChannel = TextChatService.TextChannels:FindFirstChild("RBXTeam[BrickColor]")
soft kraken
#

oh i forgot to print

#

mb

night gazelle
#

In your case I'll assume the Team Colors are Bright red and Bright blue, so it should look like this

local TCS = game:GetService("TextChatService")
local chatInputConfiguration = TCS:FindFirstChild("ChatInputBarConfiguration")
local Players = game:GetService("Players")
local Teams = game:GetService("Teams")
local redTeam = Teams:FindFirstChild("RedTeam")
local blueTeam = Teams:FindFirstChild("BlueTeam")

local function setChat(player)
    if not player and not player.Team then return end
    if player and player.Team then
        if player.Team == redTeam then
            chatInputConfiguration.TargetTextChannel = TCS.TextChannels:FindFirstChild("RBXTeamBright red")
        elseif player.Team == blueTeam then
            chatInputConfiguration.TargetTextChannel = TCS.TextChannels:FindFirstChild("RBXTeamBright blue")
        end
    end
end
#

@jovial ice

soft kraken
#

it worked

jovial ice
night gazelle
#

Yeah that too

#

It should be a local script

#

You're customizing the inputs that's why it should be in the client side

acoustic vigil
#

Trying to make a team to make a game dm if you wanna make a game together

jovial ice
soft kraken
#

ohhh so u gotta remove it to optimize?

jovial ice
#

line 12 cuz i added a task wait to let player load but not working either

#

otherwise in the script you sent its line 9

soft kraken
#

damn thats cool

#

what about the rest of the code

#

is that fine

jovial ice
# night gazelle Can you should the script

`local TCS = game:GetService("TextChatService")
local chatInputConfiguration = TCS:FindFirstChild("ChatInputBarConfiguration")
local Players = game:GetService("Players")
local Teams = game:GetService("Teams")
local redTeam = Teams:FindFirstChild("RedTeam")
local blueTeam = Teams:FindFirstChild("BlueTeam")

local function setChat(player)
if not player and not player.Team then return end
if player and player.Team then
if player.Team == redTeam then
chatInputConfiguration.TargetTextChannel = TCS.TextChannels:FindFirstChild("RBXTeamReally red")
elseif player.Team == blueTeam then
chatInputConfiguration.TargetTextChannel = TCS.TextChannels:FindFirstChild("RBXTeamReally blue")
end
end
end

setChat()`

#

Calling the function at the end as script wasnt running at first

night gazelle
#

oh do

#

setChat(Players.LocalPlayer)

#

on the last line - you didn't passed a player argument

jovial ice
#

ahh okkk

somber vault
#

Think them as a storage that you can access both client and server ( depends on where you require it from )

somber vault
#

and require them when needed

soft kraken
#

u can do that???

#

woah

somber vault
#
  • storing
#

most people put their "configs" in modulescripts

#

in serverstorage or whatever they placed it in

#

definitely not client tho

#

or exploiters go boom boom with your modulescript

soft kraken
#

yeah i can imagine doing skilltree1.skilltree2.and so on

umbral carbon
jovial ice
# night gazelle setChat(Players.LocalPlayer)

seems like I cant define the localplayer inside the argument so have done this on top with this
local player = Players.LocalPlayer
But with the arguments and everything it doesnt seem to be working

somber vault
#

it just feels more "organized"

soft kraken
somber vault
#

and I can edit the modulescript whenever I want

#

and it wont break anything

soft kraken
#

they seems fun

somber vault
#

unless I change the class

umbral carbon
umbral carbon
soft kraken
somber vault
#

good luck

#

I mean like lets say one of my configs value is 50

#

I can change it to 100 and nothing will break in other scripts that modulescripts gets required

#

unless Im doing > or < checks

#

anyway you get what I mean

soft kraken
somber vault
#

Ye I also switched to scripting after 652 hours in blender

soft kraken
#

this was the models i made but i want to give my models a life if u know what i mean

somber vault
#

I already got a game as solo dev

#

( It failed miserably, we dont talk about that )

woeful gate
#

And give it a plunger weapon

somber vault
#

every road goes to scripting

#

its the core of a game

soft kraken
#

btw what game should i go for learning basics

somber vault
#

make small projects as practices

#

If you try to make a game as a beginner, you will %100 fail

#

you can practice on simulators

jovial ice
# night gazelle oh do

Just did some further testing
The script is running smoothly with no errors appearing in chat
Have added debug messages printing when a player is assigned to a team chat as follows
if player.Team == redTeam then chatInputConfiguration.TargetTextChannel = TCS.TextChannels:FindFirstChild("RBXTeamReally red") print("Assigned to red team chat") elseif player.Team == blueTeam then chatInputConfiguration.TargetTextChannel = TCS.TextChannels:FindFirstChild("RBXTeamReally blue") print("Assigned to blue team chat") end
The debug messages are being printed but the players are still left in the global chat

soft kraken
somber vault
#

You can start with tycoon stuff

#

you can try learning data saving / leaderboards

night gazelle
somber vault
#

Great for learning basics tho

woeful gate
soft kraken
#

can i do something like "eat a ball to get bigger" or something like that and there would be a data saving too if i learn that soon

somber vault
#

Are you sure that game is gonna get 100 players at first place

somber vault
#

you can practice it

woeful gate
somber vault
#

Idk

soft kraken
somber vault
#

take your time and good luck

woeful gate
#

Yea but then those players leave

#

At least 8 mins

#

4-5 mins isn’t great

somber vault
#

I mean your goal should be at least keeping some of those players engaged with your game

#

It wont benefit you if %90 of players leave your game after first play

#

they gotta stay engaged

woeful gate
#

wait..

#

That’s to pricey

#

ok forget the robux stuff

#

I need to add free stuff too

somber vault
#

are you here for a real game talk or jokes

woeful gate
#

oh wait I just realized

#

everyone will leave

somber vault
#

isnt that too high

#

I aint paying 3k robux for a nuke all button

#

I mean what is the "harm" if everyone keeps buying it

woeful gate
#

u clearly have no experience with this stuff and neither do I!

somber vault
#

it is a cashgrab game

#

it is not supposed to live

#

it is supposed to make quick cash for future projects / funding

woeful gate
#

That’s my plan. Release cash grab then use the funds for my horror mascot game

fallen summit
#

i fucking hate scripting

#

im so sick of this

woeful gate
#

sike!

#

Never doubt yourselves small Roblox devs!

#

Strive to do your best!

fallen summit
#

i have been at this stupid shit for like the past 5 hours

woeful gate
bleak glade
fallen summit
night gazelle
fallen summit
#

its really

#

annoying

jovial ice
bleak glade
jovial ice
#

I mean according to the debug messages the script should be working just fine so

fallen summit
#

its all scripted

#

no motor setups

bleak glade
#

i used a motor and just did z -thrust

night gazelle
#

just to make sure

fallen summit
jovial ice
#

I will also try seeing if testing it outside studio actually works or not. It could be that too tbfd

fallen summit
bleak glade
#

im not sure how you set it up without a motor

night gazelle
frosty token
#

very weird question but how do i save data from one game to another, lets say im making a second version of my game. and i want all the data to save from the first to the second?

zealous crater
#

if not you’d need to use some external database but idk how reliable that would be

mystic yew
#

Anyone know how to wait for a model to fully load its descendants? Ex it has 100+ parts with the same name so waitforchild wont work. Will PreloadAsync work?

static coral
#

or you can do repeat task.wait until parent.child

somber vault
#

Again, I am not sure if this is an efficient way so make sure to wait for others answers too

prime cave
#

my code thats supposed to work as the tycoon things where the parts that drop down get colleccted isnt working, i made it work before but i accidentally lost it forever. please could anyone help, idek why it wont work it seems fine.

local CollectionService = game:GetService("CollectionService")
local cashTag = CollectionService:GetTagged("cash")
local cashCollector = game.Workspace:WaitForChild("cashCollector")
local cashDisplay = game.Workspace:WaitForChild("moneyDisplay"):WaitForChild("SurfaceGui"):WaitForChild("SIGN")

cashCollector.Touched:Connect(function(otherPart)
    for i, valueParts in pairs(cashTag) do
    print("Looped!")
    local plr = game.Players:GetPlayerFromCharacter(otherPart.Parent)
    local leaderstats = plr:WaitForChild("leaderstats")
    local cash = leaderstats:WaitForChild("Cash")
    print("Identified!")
    local value = valueParts:WaitForChild("Value")
    if otherPart == valueParts then
    cashDisplay.Text += value.Value
end
end
end)

bleak glade
uneven panther
#

can anyone help im new to coding

prime cave
#

@uneven panther

uneven panther
#

one sec

prime cave
#

no

#

send a pic

uneven panther
#

Of the entire script??

#

one sec

prime cave
#

yeah or at least the function

#

how new are you to scripting

uneven panther
#

i started like 4 weeks ago

prime cave
#

why is the script AI

uneven panther
#

what?

prime cave
#

it’s made from AI

#

look at all those — explains the stuff

uneven panther
#

how

#

i put those coause tuts told me to put them there

prime cave
#

i found error

prime cave
uneven panther
#

tutorials

prime cave
# uneven panther

at the second image, you don’t put character in the () arguments

prime cave
#

do

uneven panther
#

i watched this and he told me to put them to remember things

prime cave
#

local player = game.Players:GetPlayerFromCharacter(hit.Parent)

#

you can’t throw in character in the () because you need to mention what the character variable is as well

prime cave
uneven panther
#

then why does he tell me to do it??

#

i mean he didnt tell me he said it was optional but still

prime cave
prime cave
uneven panther
uneven panther
halcyon tendon
#

i know this is a bad place to ask and this is not an advertisement but a question - but how much roughly would it be for a scripter to make a set of completely built competitions (think mario party style) function? like just an estimate

uneven panther
#

why

prime cave
uneven panther
prime cave
#

by 4 weeks, you should be able to write code without memorization

uneven panther
#

i have bad memory

prime cave
#

I also have 4 weeks of experience, I do stuff with no memorization

uneven panther
#

i was born with it

prime cave
prime cave
uneven panther
prime cave
#

learn LUAU. don’t memorize LUAU

#

see the difference

uneven panther
#

how can i memorize with bad memory that my doctor said that cant be fixed

prime cave
bleak glade
uneven panther
#

and i put it in the spawner

bleak glade
#

no, the remote

uneven panther
prime cave
uneven panther
uneven panther
prime cave
bleak glade
prime cave
bleak glade
#

the remote wouldnt just walk out of replicatedstorage

uneven panther
prime cave
prime cave
prime cave
uneven panther
#

i have two people flaming me at once

uneven panther
bleak glade
#

its more of critism to help you

uneven panther
#

what does everyone want from me

#

im new as you can tell

prime cave
prime cave
uneven panther
bleak glade
#

let me tell you what to change

sullen flicker
prime cave
sullen flicker
uneven panther
bleak glade
#

1: theres no reason to instance the remote and folder, you called the spawn folder twice, and spawnblocks looks like it doesnt end?

prime cave
#

you grabbed player wrong. there’s also a bunch of extra lines of code but I’m not fixing all that at 1:30 am rn

prime cave
uneven panther
prime cave
#

remove the instancing that isn’t needed

bleak glade
uneven panther
prime cave
#

and just do

#

a while true do statement

uneven panther
prime cave
uneven panther
bleak glade
prime cave
uneven panther
#

it didnt fix it

#

error thing

sullen flicker
bleak glade
sullen flicker
prime cave
sullen flicker
uneven panther
#

@prime cave

uneven panther
bleak glade
sullen flicker
#

How could I fix that then

bleak glade
#

let me try tweaking your settings

prime cave
sullen flicker
uneven panther
prime cave
#

and 46 should be fine so just fix 79 and make the () empty instead of having player in it

uneven panther
#

oh ok

prime cave
uneven panther
#

ok

bleak glade
uneven panther
sullen flicker
#

What

prime cave
uneven panther
bleak glade
#

it may be your fov hold on

#

im gonna manually change the fov

sullen flicker
#

Alright

prime cave
bleak glade
# sullen flicker Alright
local FOV = 30  
local ZoomFactor = 10 
local Distance = 800 / ZoomFactor  

local player = game.Players.LocalPlayer
local camera = game.Workspace.CurrentCamera
local character = player.Character or player.CharacterAdded:Wait()
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
local humanoid = character:WaitForChild("Humanoid")

camera.FieldOfView = FOV
camera.CameraType = Enum.CameraType.Scriptable

local RunService = game:GetService("RunService")

local cameraDistance = Distance
local Multiply = 0.7075
local cameraHeight = cameraDistance * Multiply
local cameraAngleOffset = 0 

local angleRadians = math.rad(cameraAngleOffset)

RunService.RenderStepped:Connect(function()
    if character and humanoidRootPart then
        local offsetX = math.sin(angleRadians) * cameraDistance
        local offsetZ = math.cos(angleRadians) * cameraDistance
        local cameraPosition = humanoidRootPart.Position + Vector3.new(offsetX, cameraHeight, offsetZ)

        camera.CFrame = CFrame.new(cameraPosition, humanoidRootPart.Position)
    end
end)
``` try this
sullen flicker
#

got you will do

uneven panther
sullen flicker
#

Yeah that works

uneven panther
sullen flicker
#

Will I be able to make the camera further tho @bleak glade ?

bleak glade
#

change that how you want

sullen flicker
#

You are a life saver

prime cave
sullen flicker
#

Works perfectly now, Thank you

prime cave
#

*statement line

sullen flicker
#

Did you change up the angle a bit as well or

bleak glade
uneven panther
sullen flicker
bleak glade
#

well nvm that does the same thing as distance

sullen flicker
#

Actually camera might be even better at this angle

bleak glade
#

that applies on the x and z based on your structure

sullen flicker
#

Thank you yoda

bleak glade
#

np

sullen flicker
#

Do you maybe have an idea on how I could enable zooming sort of

#

But still limit it

bleak glade
#

maybe

#

fov manipulation probably

sullen flicker
#

Or the Zoomfactor

bleak glade
#

ill try something rq

sullen flicker
#

Sure thank you

uneven panther
#

@prime cave never mind i fixed it

bleak glade
signal pewter
#

can someone help me this is a joined/left chat script, sometimes it works, other times it only shows the join messsage when you reset or leave

script.Parent.Parent.CharacterAdded:Wait()



local function makeMessage(display, username, jl)
    local txt = "Welcome to Fv's Time Trial 2, " .. display .. " (@" .. username .. ")!"
    local color
    if txt == "Welcome to Fv's Time Trial 2, " .. display .. " (@" .. username .. ")!" then
        color = "0,255,0"
    else
        color = "255,0,0"
    end
    
    local format = string.format("<font color=\"rgb(%s)\">%s</font>", color, txt)
    if tcs.ChatVersion == Enum.ChatVersion.TextChatService then
        tcs.TextChannels.RBXGeneral:DisplaySystemMessage(format)
    else
        game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {Text = format})
    end
    
end

makeMessage(game.Players.LocalPlayer.DisplayName, game.Players.LocalPlayer.Name, "joined")

game:GetService("Players").PlayerAdded:Connect(function(plr)
    makeMessage(plr.DisplayName, plr.Name, "joined")
end)

game:GetService("Players").PlayerRemoving:Connect(function(plr)
    makeMessage(plr.DisplayName, plr.Name, "left")
end)
jovial ice
jovial ice
unkempt brook
#

how do i make it so my health doesnt go to inf after the value becomes larger than 9.223 qi

latent gust
unkempt brook
#

im making a game with very high values

latent gust
#

it has to be a float

ivory kite
# signal pewter can someone help me this is a joined/left chat script, sometimes it works, other...
  1. The signal at the start assumes your character hasn't loaded yet, so there will be times your character loads faster than the script, therefore waiting for you to respawn.
  2. Considering this is a LocalScript, you should be using LocalPlayer instead of making an ancestor staircase for clarity.
  3. This is me nitpicking, but I prefer to format strings instead of concatenating them. It makes it easier for you to edit them in the future.
  4. Make sure you include lua in your discord code block so they format properly.
local TCS = game:GetService("TextChatService")
local PLRS = game:GetService("Players")

local function makeMessage(display : string, username : string, isJoining : boolean?)
    local txt = if isJoining then ("Welcome to Fv's Time Trial 2, %s (@%s)!"):format(display, username) else ("%s (@%s) left the game."):format(display, username)
    
    local color = if isJoining then "0,255,0" else "255,0,0"
    
    local format = string.format("<font color=\"rgb(%s)\">%s</font>", color, txt)
    if TCS.ChatVersion == Enum.ChatVersion.TextChatService then
        TCS.TextChannels.RBXGeneral:DisplaySystemMessage(format)
    else
        game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {Text = format})
    end

end

local function PlayerAdded(Player : Player)
    makeMessage(Player.DisplayName, Player.Name, true)
end

local function PlayerRemoving(Player : Player)
    makeMessage(Player.DisplayName, Player.Name, false)
end

PLRS.PlayerAdded:Connect(PlayerAdded)
PLRS.PlayerRemoving:Connect(PlayerRemoving)
for _,v in pairs(PLRS:GetPlayers()) do PlayerAdded(v) end

This should work, but I haven't tested it. Put this in your StarterPlayerScripts instead, if it wasn't there already.

unkempt brook
latent gust
#

Luau cannot store integers beyond 2^53 - 1

#

you can try IntValue

ivory kite
#

^

hasty mesa
jovial ice
ivory kite
#

Specifies the language the code inside the block uses, helps highlight values and key words

tender steppe
#

who can help me with my record must know how to script ui or gui dont matter and build lmk!

fiery crow
#

is there any downside to using "workspace" or should i "local Workspace = game:GetService("Workspace")"

i assume the only benefit to a workspace variable is consistency?

ivory kite
#

I haven't seen a time where workspace hasn't been loaded already when a script has called it, but if you really want to be safe you can call game:GetService("Workspace") instead of workspace.

fiery crow
simple yew
#

selling battlegrounds system (DM ME)

signal pewter
simple yew
zealous crater
signal pewter
simple yew
zealous crater
unkempt brook
zealous crater
#

its like buying a leaked map

zealous crater
ivory kite
zealous crater
simple yew
#

Mine is acually diff since I acually made it with me and my friends

zealous crater
#

i just assume urs is also ass

#

if u say so

simple yew
#

Ight

zealous crater
#

still wouldnt buy something that other people have

signal pewter
#

ty bro ill keep what you said in mind for future refernce

ivory kite
simple yew
signal pewter
#

is it limited to r6 or r15 compatible?

simple yew
#

Why should I change it?

zealous crater
#

i cant play it tho cause ilost my phone and i cant log into roblox without it so

simple yew
#

Track that shit

zealous crater
#

idk bruh its dark and i dont have my glasses on

#

its in my house somewhere im not worried

#

misplaced*

simple yew
zealous crater
ivory kite
# unkempt brook r u sure that'll work?

AFAIK you can make something like this and this should work as you want:

local HealthTracker = {}
HealthTracker.__index = HealthTracker

function HealthTracker.new(Humanoid : Humanoid)
    local self = setmetatable({}, HealthTracker)
    
    self.Hum = Humanoid
    
    return self
end

function HealthTracker:SetMax(NewValue : number)
    NewValue = tonumber(NewValue) or 0
    self.Hum.MaxHealth = math.clamp(NewValue, 0, 10000000)
end

function HealthTracker:Set(NewValue : number)
    NewValue = tonumber(NewValue) or 0
    self.Hum.Health = math.clamp(NewValue, 0, 10000000)
end

return HealthTracker
simple yew
#

The only thing is is that the vaulting animations were made by me and they looka ass since i aint an animator but i dont think anyones worried about that

unkempt brook
jovial ice
ivory kite
#

You will have to call the SetMax and Set methods respectively of this class in order to properly track the value because Roblox will automatically set the humanoid's health properties to "inf" when they reach a certain limit

jovial ice
#

yall, got an issue with my script. When testing on local with 2+ player instances 90% of the time at least 1 of the player instances will initially be assigned to the correct text channel and then be assigned to the wrong one straight after, not sure why
This is the function handling this

local function setChat(player)
    if not player and not player.Team then return end
    if player and player.Team then
        task.wait(5) 
        if player.Team == redTeam then
            chatInputConfiguration.TargetTextChannel = redChat
            print("Assigned to red team chat") 
        elseif player.Team == blueTeam then
            chatInputConfiguration.TargetTextChannel = blueChat
            print("Assigned to blue team chat")
        end
    end
end```
ivory kite
#

That doesn't look right

jovial ice
#

ok not sure how to use the lua thing on pc as im not manually typing the signs but using the ds formatting function after highliting the code

jovial ice
ivory kite
#

Three tildes
```lua
local function setChat(player)
if not player and not player.Team then return end
if player and player.Team then
task.wait(5)
if player.Team == redTeam then
chatInputConfiguration.TargetTextChannel = redChat
print("Assigned to red team chat")
elseif player.Team == blueTeam then
chatInputConfiguration.TargetTextChannel = blueChat
print("Assigned to blue team chat")
end
end
end
```

#

Like this

#

And your code is in-between the first and third line

#
local function setChat(player)
    if not player and not player.Team then return end
    if player and player.Team then
        task.wait(5) 
        if player.Team == redTeam then
            chatInputConfiguration.TargetTextChannel = redChat
            print("Assigned to red team chat") 
        elseif player.Team == blueTeam then
            chatInputConfiguration.TargetTextChannel = blueChat
            print("Assigned to blue team chat")
        end
    end
end
jovial ice
jovial ice
#

It also seems like even when the issue happens, if I send a message on the player instance that has had the bug occuring, any other instance in the same team(and therefore same team chat) wont even be able to see the message

ivory kite
#

Also, looking at your code here, it looks like you'll have to increase the size of the "if else" statement in order to accomodate for more teams.

Personally, if I were you, I'd opt for something like this:

  local Channels = {
       [redTeam] = redChat,
       [blueTeam] = blueChat
  }
  local function setChat(Player)
      if not Player then return end
      
      local TargetChat = if Player.Team then Channels[Player.Team] else nil
      if TargetChat then
         chatInputConfiguration.TargetTextChannel = TargetChat
         print(("Assigned to the %s team chat."):format(Player.Team.Name))
      end
  end
jovial ice
stable verge
ivory kite
jovial ice
ivory kite
#

What are you assigning to redTeam and blueTeam?

stable verge
# fiery crow its not anchored?

yea its not anchored. Im using alignPosition and whne i press mouseButton1Down, i set the attachment1 to nil so that it wont float but it just stays there until my character pushes it

jovial ice
ivory kite
#

What are their colors?

jovial ice
ivory kite
#

lua needs to be right after the three backticks

ivory kite
#

Put the closing three backticks on a line below it

#

It should look like
```lua
local blueChat = TCS:WaitForChild("TextChannels"):WaitForChild("RBXTeamReally blue")
local redChat = TCS:WaitForChild("TextChannels"):WaitForChild("RBXTeamReally red")
```

#
local blueChat = TCS:WaitForChild("TextChannels"):WaitForChild("RBXTeamReally blue")
local redChat = TCS:WaitForChild("TextChannels"):WaitForChild("RBXTeamReally red")
jovial ice
#

dunno ds be hating on me

#
local redTeam = Teams:FindFirstChild("RedTeam")
local blueTeam = Teams:FindFirstChild("BlueTeam")
#

and now it works. Anyway these are the team variables

ivory kite
#

Okay, I think it's probably an issue with the roblox team system. Do they have matching colors?

fiery crow
#

could also be your network ownership like dd said

jovial ice
#

I have assigned the team colours thro explorer. Only thing done thro script is assigning players to the teams upon joining and now the chat

ivory kite
#

Hold on, so if I'm following you correctly..
Both of your team instances have the same color property?

ivory kite
#

Teams have a property called "Color"

jovial ice
#

Yea but the colour property has a different colour assigned for each team

slender salmon
#

for beam/projectile following type moves is just sending the players mouse pos through a event the best way to go

ivory kite
#

Can you send me a clip of the issue?

jovial ice
#

dunno if my pc has got a recording program on

#

This is literally what is going on in the console
Tested a couple of times and only thing I noticed is this only occuring in the istance that is assigned to the blue team(havent tested more than 3 times or with more than 2 instances so cant confirm if it occasionally happens to an instance that is assigned to the red team

Also it doesnt happen all the time but only occasionally, completely random too

ivory kite
#

Do you have autoAssignable on the teams?

jovial ice
#

And when checking the ChatInputBarConfig on the istance that has seen this issue it is indeed assigned to the wrong channel

jovial ice
#

lemme grab the script rq

#
local TeamManager = {}

local TeamService = game:GetService("Teams")
local Players = game:GetService("Players")

-- Team references
local Teams = {
    Blue = TeamService:FindFirstChild("BlueTeam"),
    Red = TeamService:FindFirstChild("RedTeam")
}

-- Player tracking
local TeamPlayers = {
    Blue = {},
    Red = {}
}

-- Assigning players to teams
function TeamManager.AssignPlayer(player)
    if not player then return end
    
    local blueCount = #TeamPlayers.Blue
    local redCount = #TeamPlayers.Red
    
    if blueCount <= redCount then
        player.Team = Teams.Blue
        table.insert(TeamPlayers.Blue, player)
    else
        player.Team = Teams.Red
        table.insert(TeamPlayers.Red, player)
    end
    
    print(player.Name .. " has been assigned to " .. player.Team.Name .. " team.")
end

function TeamManager.Init()
    -- Assign existing players (useful for testing in Studio)
    for _, player in ipairs(Players:GetPlayers()) do
        TeamManager.AssignPlayer(player)
    end

    -- Assign new players when they join
    Players.PlayerAdded:Connect(TeamManager.AssignPlayer)
end

return TeamManager
jovial ice
#

I did it this way to make sure that both teams will have same amount of players(gamemode presents 1 round where teams are assigned upon joining and never change for the duration of the round. Players will join the round from the lobby place by being teleported in the place where the round will occur)

sleek rose
#

Anyone here worked with nodejs on a roblox bot?

cyan lantern
#

scripters rate datastores in terms of difficulty 0 to 10

dusty ravine
#

8

warm pumice
#

0

latent gust
#

the difficulty is usually in using them asychronously

night gazelle
#

You forget error handling and adding edge cases

latent gust
night gazelle
latent gust
night gazelle
#

It's not difficult perse but it's annoying or a hassle

night gazelle
latent gust
#

what are you trying to achieve

night gazelle
#

Since last I used their API was years ago,before they updated to Datastore v2

frail pendant
#

How can I fix this:

local foodCount = 0

repeat
    print(foodCount)
    foodCount += 1
until foodCount == 5

while true do
    wait()
    game.Workspace.Baseplate.Transparency += 0.01
end

My repeat loop only prints up to 4, and while loop won't work

safe gazelle
#

how do you find the different functions and what they do on roblox

stiff ibex
safe gazelle
safe gazelle
#

oh

stiff ibex
#

In Roblox Studio, the language is compiled

safe gazelle
#

yeah then how do i find a list of those

#

i want to learn most of them and how they work

stiff ibex
#

the compilation language for Luau is C

safe gazelle
#

c++?

stiff ibex
#

no

#

just normal C

safe gazelle
#

okay

stiff ibex
#

I looked at the files, and there's no CPP or C# file

safe gazelle
#

but i thought roblox made their own functions to develop game

safe gazelle
#

not just print but like screenGui or something

#

or size and position

stiff ibex
#

they just use Luau (which was produced by them) with different ways of functioning

stiff ibex
#

however, in Luau, there's one function that was removed because of security violations

cyan lantern
safe gazelle
#

so if i learn lua it is the same as roblox ?

stiff ibex
# wanton cloud what function?

and that's os.execute, this is simply a command function that communicates to the computer that runs the inputted command

safe gazelle
#

is roblox function the same as lua

stiff ibex
#

Here's an example

stiff ibex
safe gazelle
#

because i thought they have there own functions for lua

stiff ibex
#

so personnaly I'd say yes

#

just know that some stuff in regular lua isn't available for luau

cyan lantern
wanton cloud
stiff ibex
#

because it's sandboxed

stiff ibex
cyan lantern
safe gazelle
#

i mean't the roblox api functions then

#

how do i get a better list of those

stiff ibex
#
--[[
    
    Environment variable whitelist for release builds.

    Only variables authorized by this routine may be set using the setenv console command

]]

function PrivateFunctions.env_blacklist(name,write)
    if not Main.PRODUCT_INFO.RELEASE_BUILD then return end
    local i = 0
    local release_env_set_whitelist = {
        "auto-boot",
        "boot-args",
        "debug-uarts",
        "filesize",
        "pwr-path",
        nil
    }

    -- selective setenv
    if write then
        for i = 1, #release_env_set_whitelist do
            if release_env_set_whitelist[i] == name then
                return false
            end
        end

        -- variable is blacklisted
        return true
    end
    -- allow indiscriminate getenv
    return false
end

Environment blacklist function for lib_env.

stiff ibex
safe gazelle
#

hey i have question how do i learn roblox coding because roblox has different things