#code-discussion
1 messages · Page 45 of 1
punch script
oh
yeah there is a bunch of different ways too handle a punch
Programming nerds
i wouldn't say any of the methods are "easy" for someone new.
u are programmer?
like how do u play a animation
aight ty
just playing the punch animation is simple though yeah
enjoy
when actually doing the combat system / hit detection look on youtube/forums and see what system you like the most.
combat can be a broad subject
aight
Someone can help me in vscode luau lsp setup?
Looking to Start a Roblox Game Studio!
I'm looking to start a Roblox game studio where we can collaborate on multiple games and projects.
I’m also looking for a co-owner or co-owners to help lead and shape this journey with me. If you're interested in building something cool together, feel free to DM me or reply to this post!
hey guys, im making a group project and im experiancing an issue with the animations loading only i can see them
could it be bc of the ownership of the anims?
i have them posted under the group that the games made under
why not just use remote functions instead of remote events? what is the difference
Remote functions are unsafe and can give the client the ability to yield the server
Remote functions can let the client yield
What he said
if i want an undo feature for a building system, do i clone the "before" parts and spawn it back when ctrl + z is pressed, or do i save the "before" state of the property of the parts and apply it to the parts when ctrl + z is pressed
they're having an argument over in #code-help so please forgive me for asking it here
Personally i'd properties
roblox broke a lot of stuff with them changing the fact u can't use .Chatted in local scripts anymore
I'm unable to find clickdetectors in 2 tools I have located 😭
local cc = i:WaitForChild("ClickDetector")
i.MouseClick:Connect(function(plr)
print(plr.Name)
end)
end```
I don't think at least 1 of them was crucial to the gameplay
it was prolly like if plr.chatted then sillysound:play()
it breaks any cmds that were registered on the client, like custom emotes
just kinda annoying
Guys quick question, I wanted to know if someone (for exemple myself) would be able to start doing commission after following (and learning) both beginner and advanced brawldev scripting guide or if I had to still try to do stuff on my own, been watching the #scripter-hiring for a while and everything seems uh, overwhelming
Is there any way to make it so if a server has 1 less than the server maximum, the user will be redirected to a different server, or just being prevented totally from joining that server at all when clicking play?
a
i am making a pathfinding script for a horror game but during test i found out that if the monster kills someone just stand still and doesn't go after the other players
can someone help me with this what did i do wrong
depends how much time you put it in, but I heard that if you don't cook your brain with scripting, it takes like around 6 month to a year
Depends what you define by "good" as well
Do u know what hide or die game on Roblox is
kinda
I’ll do like 3 hours to 2 hours a day
I just forgot what I was gonna say 😢
Like how how would I take to be able to do scripting like that good
what ressources u use for learning
I don’t really know where to learn at
well you have youtube and roblox dev hub I'd say
I'm learning from youtube currently
from brawldev who has the most recent playlist
but I tried thedevking back then and it was good
just make sure to make something yourself by the end of every video using what you learnt
else you will not remember a thing
and btw if you take away all the gamepass stuff etc.. the base of the game is pretty easy
just think of that game when you watch these videos and how the game (hide or die) might implement it in their game (that stuff is helping me alot understand hard concept like pairs and ipairs or events)
Ty
Personally, I just binged TheDevKing
hey! i have a question about scripting because i recently just started
i watched a tutorial video on a little bit of the basics like making a kill brick, boleans, e.t.c
i wanted to know what should be my first step forward to becoming a better scripter
More tutorials 🗿
okay thanks
Oh and trying to do the things in the video without help
lf a good scripter to make a game for fun ill pay btw
GnomeCode?
Jk who

Yes buckets full of cash
Jk no im rich because my bro is very good at coding and we learn with each other and get better together
We learn new things together and work on all aspects of are games together
And the better i get at coding the more smooth are system becomes
this master coder
Oh i can show u
sure
Worked on royal high before did security
Worked on are own games called lightdash
Invasion
What’s his user
What’s ur user
Dang mb
I don’t see the problem
Just look up 3dengineer
Lil jit didn’t add a close button 💔
ion know how to do ts 😭
That’s not even a person
im not into gui
u a jit
„BuildOutOfGames“ 🕊️
Building
Gather inspiration
Who are these people
@waxen echo deleting or changing your messages doesn’t stop moderation. Behave yourself.
Expertgame_creations
You‘re one step ahead
Fyoozegames has 2 members
Lol 😂
Sorry
XD
Cooked

So you mind reposting that? Asking for a friend
Am I you’re fam? 🥺
you’re 3dengineer?
Yeah
Mmmm
so he’s a master coder
Basically yes
bro i added a close button shi isnt closing 💔
because they worked security on royal high
im gonna cry
Did you code it?
That was just one client
We have worked on a lot of clients
ok
i gotta do that to 💔
Check the friends im even friends with ice7 royal highs coder
Jit forgot to script it 💔💔
sigh
Anyways its really not a big deal
how do you know so many master coders
Flexing friends now
I dont
Im down bad
sigh
How long have you been coding for
its a roblox link lol
ill believe you when your accounts linked
Dont care link = dont press
how do you do that
whoever does ui pm me asap im paying good per task simple simulator ui
Right, aren’t you like working at Rumble Studios? We‘re sharing the same Server
settings
What exactly do u need
Because i have some ui already
Yo i asked a simple question how long have you been coding
tell me what ive been doing wrong
If I’m right my assumption, that he is working for Rumble Studios. He is pretty busy, I assume
@somber vault is that bettter now
simulator style frames and buttons
Show the local script
it does
1.5 year
Is what better now
i meant to @ him
alright i believe you now
You are not a master coder 1.5 then keep coding constantly for another 6 years
When it’s clicked set the visibility to false or true.
im a full time roblox developer lol
Sorry bro my bro is definitely better
lmao
lemme check
And we dont even do it full time
u dont work on a game that has 5 billion+ visits
do you use rojo
is it worth using/ alongside something like knit
Are you calling the function?
for client/ server? or for everything
damn thats impressive
huh
Lol bro thats basics
toggleFrame
we use a networking module where we only have 2 remote events for the whole game

That function needs to be called somewhere, in order to work
???
it uses a janitor/trove to clean up old connections?
where exactly
getting 5billion+ visits on a game is the basics?
Its not that hard
who is this kid
we only use maid for our oop classes
When you press the button
lmao who are you bruh
#hi
LMAO
Humble yourself
when i press the button its not registering
C minus minus, huh?
u literally came into this chat bragging about your bro who worked on royal high
What do you mean not registering?
what does a maid do again? i only use janitor and sometimes troves
like when i press the x button to leave the inventory it doesnt close
Add code for when the specific button is pressed, the desired frame closes
havent heard of it, is it like a wrapper like good signal?
eg pls
that allows you to call anything anywhere on the same side
„eg“?
just like you would call a signal
I don’t understand what you mean by that anyways. Its true i said i learn from a master coder you didnt need to even interact with it could have just let me say good stuff about people
u just gotta call the module
example
so its shared in a module
across the server and same client
You started acting like anyone should care you work on a game with 5b visit
Button.Activated:Connect(function()
desiredFrame.Visible = false
end)
Simple close button mechanic
We don’t because you weird
i do because i want to learn from better people
i dont work on a game that has 5bil visits
i work on 10bill+ visits
put it under toggle frame?
I‘d make a separate function
But it’s up to you
What game(s)?
You are still a weirdo
ok
literally u bragging about ur master coder friend that worked on royal high security and saying ur filthy rich
Make it a module script in serverscripts so u can use it for all close buttons or smthing
Arsenal, Counter blox, Bubble gum sim, rumble quest, mining sim
I never disclosed any amount of money
yeah u just said "filthy rich"
And i said jk in front of the message
About modules. Is it okay that 3/4 of my ReplicatedStorage is full of modules?
well we just keep the module in replicatedstorage
liek this
add me? id like to learn more about better frameworks
Impressive
ohhh
so you can use it on either
ok
Bro is playing modularity sim
yeah you were definitely bragging about how you were filthy rich in health
You have to define the variables now
It was clearly not ment to hurt anyones feelings
Module RNG
so liek x etc?
I was just saying im thankful to have that opportunity to learn from my mentor
Get a grip on reality
lol
Move the function out of toggle function thing, and defined Button and desiredFrame
can write it for me im to dumb 💔 🙏
I‘m on phone, so either ask someone else or at final option: AI
what to ask ai
Explain your issue detailed enough for it to understand
You must not be functioning correctly you think anyone respects that attitude
oki
And also tell it how you set up the buttons in StaterGui
Like where each button, frame and whatnot, is located it
AHHH
nvm
u need to chill brother and flex on someone else
You need to grow up
You not flexing with 10b visit royal high got 10b too lol
But u did prove how childish you are
what u need help with
Yeah im just a human
I can help from start
i need make a new vid hollon
pls do
why do you have a frame paramter that isnt be used at all in this function
Let’s chat in Private Messages instead of here?
His function didn’t end there. I believe he used it later on
sure
bro cant even make gui close 💀
that's the only problem?
pm to script and make ui for an entire game (simulator VERY simple) pay is 20-30k robux
i can sense that ur rngui is not in ur gui and the way ur making the variable gui = plr.playergui.maingui is the wrong way to get it
where do I store a tool
Is there a rank system between scripters ?
Backpack
how to make my ball physic beter
i am practing my gui and I want to make a shop so I was wondering where to store my tools
ServerStorage
You give them on the Server
client
did u figure it out?
yo does anyone know how to optimize ur game
my game uses a lot of zombies but they lag when they walk since there are a lot
Yes. We are working on it together.
actors
Is Humanoid:GetHumanoidDescription() functional with r6?
can i connect a boolvalue from serverscriptservice to topbarv3 like to show hitboxes??
this is such a specific question
idk how to simplify it
so like i wanna show hitboxes from a button with topbar right
and im wondering if i can connect a boolvalue
you can do whatever you want
im wondering how tho
yeah u can
u would just have the button action connected to a script that highlights players through walls
I’m sure top bar buttons have a signal to connect to and require that you connect the buttons to
oh i meant like attacking hitboxes i was making a combat game and wanted to make it so you can see the hitbox if you click it and it triggers the bool value
idrk much abt it
Should i keep all my abilities in one module or make an indiviual module for each one?
anyone want to make a small easy plugin? ill provide the needed assets you would just need to script
what kind of plugin
How much are you paying and what kind of plugin
just a plugin to insert assets
its honestly cringe when people just bash new scripters instead of helping
Agreed
Bro look at this optimization lol
i agree, but there is a point where it just becomes spoonfeeding and probably does deserve a good bashing
a lot of people come in servers/forums like these and aren't very self-sufficient or have some form of "learned helplessness"
for example, having a 100 message conversation about something basic that could be googled or found in a manual in 5 seconds.
its just proper etiquette to look into things yourself first
Atleast show it working not just a print output
Its a searching algorithm integrated with pathfinding service (cannt show the output cuz i dont have permission to share anything about this project), you can compare it with like clash of clans path finding like how the troops search for there target and try to reach there by breaking as much low walls as possible
anyone on?
So basically in short a smarter pathfinding with less time taking
Is using character attributes the best way to set states, or is there a better way?
uhhh guys my cube aint cubing 
idk wym, i use attributes to make easy accesible data without having to re-define a big dictionary and values on different variables, so if u state u mean a boolean state, then maybe? but it only matters when u have many different states on many different objects
wtf
i was reading >:c
I mean the attributes you can have on objects, and they're like booleans and stringss and number and such
mhm
so like having say I have 1000 attributes for a bunch of states in my game, is that the best optimization i can do?
wtf, 1000 ATTRIBUTES? the thing is that i dont know what u tryna do, cus instead of attributes u could have a big list on the script
ok maybe not 1000, but like a bunch of combat and movment states for different weapons n such, would attributes be the best for my game?
ohhh, for doing combos? hmmm, i mean for optimization i think it will be the same, and if theres a difference, i dont think it would be that big, just do whats more comfortable, but if u r gonna have many weapons, consider doing OOP and or multi-threading if u need things to be optimized, but i recommend first trying coroutines
cant rly say much on combos, cus the one i made is based on addition over inf time, but if u want to make a chained combo, just use the clock function and calculate the time in seconds u want in between the click events to create combos, no need for states on the object's attributes.
is there a way to check if the other argument = something?
so for example if ANY of the arguments equals 0 then I run the same code
ion think I can put "or" in the argument lol
Use it within ()?
yea
Oh wait i misread your question
I mean I already took a roundabout so its fine
instead of trying to do what I said I just split the arguments with diff functions
its LUAU memory so ion think its gonna affect preformance
I mean u could just do a function and check each value then if one value is 0 return true but maybe thats what you already did?
wouldnt that be like a while loop
heres what I did
No you just call the function whenever u want
Or you want it to check each time a value changes maybe
anyone here interested in making a game about fighting in planes?
im a buiulder with 1.5 yrs of experience
my cube is now 3d instead of ??d :]
dev notcode discusion
Hello, can you help me? I have a rebirth button that i want to use for rebirths. If a player reaches a set amount of stages then the player would be sent at the start but i can't script. Im almost finished with my game. I'll be glad for any help. If you can help please DM me.
cool repair system??
the flicker hurts
yeah the issue is that it would clear the frames too fast for people to see it, so i made a delay for it
bro just use a path2d 😭
theres no way you have to clear and create those frames on demand
yeah lol, they r kinda overpowered
no i just use frames though i should really get that API
ye seems super useful
i haven't really used it yet, but im about to play with it soon
it really is, people made 3d renderers way better then mine using it
it kinda sucks ngl, i was playin with it as soon as it released and even with just a 128x128 image it lagged like crazy
A compilation of random EditableImage/EditableMesh projects I made.
Timestamps:
- Captcha Gen: 00:00
- 2D "Shader" Viz: 00:36
- Interactive Julia Set Equation: 00:59
- Multiple Neighbor Cellular Automata: 01:21
- Perspective Grid & Vanishing Line: 01:40
- Chaos Equation Visualizer: 02:00
- EditableMesh Audio Spectrum Visualizer: 02:14
Perspect...
idk seems pretty fast too me (for intermediate graphics at least) @severe bloom
weird ill take a look into it again
atleast for my water renderer it was stupidly laggy
it may have been pretty bad when first released idk
or just the algorithms you used maybe
probably something on my end
it was just sum of sines, nothin like fft
for intermediate graphics (and not direct access to the gpu) its pretty hefty *
but yeah seems fast ash too me, from looking at those examples atleast
i wish roblox would give direct access to the gpu 😭 but its too insecure
letting us write shaders would be fire at least
ong
Some tests of various raycast renderers on Roblox - rendered with EditableImage DrawRectangle/WritePixelBuffer.
Shade/Fog/Quantize Rectangle Renderer: 00:00
Basic Lighting/Shade/Fog Rectangle Renderer: 00:31
Volumetric Lighting/Shade/Fog/Quantize Rectangle Renderer: 00:53
Pixel Buffer/Multi-Threaded Fog/Shading/Lighting Renderer: 01:11
Music ...
inb4 people make hacky unoptimized shaders with this
ye
what can I use to record clips of my work? gyazo is too short
thats pretty cool how long did it take u
Does anyone know why my webhooks work on studio but not on roblox
im making a fun obby guys would anyone be down to help with some scripting , building levels , modelling etc dm me if u wanna join its a fun journey we can share the earnings we get 😄
Yes
Woah
but how can this run smoothly?
I'm still learning but I don't understand anything about scripting...
Then understand
How much?
What’s the issue?
I have published two games: one with a lobby, and the other one with a map. I need a person to be teleported from the lobby into the map.
but they're both start places
Then publish them into one game
Best way to learn scripting?
By learning.
youtube, then working with random items in toolbox probably
i did that now what?
i couldn't find it
okay.
Go to View Tab, Asset Manager > Places
If you’ve done everything as I said, you should find it there
i did but for some reason i couldn't find it
ill retry
oh the name was changed i thought it was the new place i made before
thanks for the help i appreciate it
No problem
not mine
who here can script good and is intrested in making a gamewho here can script good, if u can dm me
what is this?
Roblox
is it normal?
Yes and no in the sense that there’s almost nothing you can do. WiFi prolly bugged out a little bit and it triggered the warnings
Indeed
alr tysm for helping
Just check your WiFi and if it’s good it was probably a one off thing
yea my wifi is bad rn
Some people js can’t understand no means no
Every time it’s “who can make a full game”
Like there is some wizard that can be a one man team
guyss help whats rongg
local rainspwaned = 0
local rainthingss = math.random(1,1000)
while true do
if rainspwaned >= rainthingss then
break
end
local randomnumber = math.random(1,53)
local randomnumber2 = math.random(1,53)
local randomnumber3 = math.random(1,53)
rainspwaned = rainspwaned + 1
wait()
local rain = Instance.new("Part", game.Workspace )
rain.Size = Vector3.new (0.5,2,0.5)
rain.Position = Vector3.new (randomnumber,randomnumber3,randomnumber2)
rain.Transparency = 0.5
rain.Anchored = false
touched = game.Parent.Touched:Connect(function(hit)
if rain.touched.player then
game.Players.HumaniodHealth = 75
end
end)
like the touched part doesnt work
Your variable names.
ooh and whats the porblem with the names?
game.Workspace.Part.Touched:Connect(function(hit)
local character = player.Parent
local humanoid = character:FindFirstChild("Humanoid")
local playerCash = player.leaderstats.Cash
if humanoid then
playerCash = playerCash + 1
end
end) help
why do i suck so much at scripting
had 4 people play my game (with roblox premium) for 45 mins but i dont see anything in premium payout anyone know why?
because it has to be like a long time and that the players comeback
has 2 be 1hr
i think
lf a scripter to collab with i do ui i js want to make a simple game (i can invest 100k+ in ads)
can someone rate my portfolio?
I have an elevator with prismatic constain, but player jumping slowly it down, why? I have force on amx
max*
How much time should I dedicate to learning luau basics?
just say
"no"
to these type of people
as long as it takes u to learn luau basics
All u need 2 do is practice, over time u will get better
Dude, what am i doing wrong? I can't get a single commission even though I have great coding skills and 2 years of experience, what do I do?
just wait
itll update
I've acquired a data management system with session locking but I have no knowledge of Roblox physics
And honestly I don't know which one of them is harder to acquire
Welcome to Roblox development 😊
None of those in #scripter-hiring will respond to you but they will keep reposting
i wnna add images how
add imagelabels
and how do i add an image
1 hour a day for basics
40 minutes - 1 hour
so how do i add an image
guys i got a question if i make a script that prompts a favrioute option can i make it a one time only reward for doing so and how
ts so basic
kk
like me lol
how do i make ts dark mode light mode is killing me
i like basic
nvm
alr
local MarketplaceService = game:GetService("MarketplaceService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ProductPurchasedEvent = ReplicatedStorage:WaitForChild("ProductPurchasedEvent")
MarketplaceService.ProcessReceipt = function(receiptInfo)
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
if player and receiptInfo.ProductId == 3262930693 then
ProductPurchasedEvent:FireServer(player, receiptInfo.ProductId)
return Enum.ProductPurchaseDecision.PurchaseGranted
end
return Enum.ProductPurchaseDecision.NotProcessedYet
end
WHATS WRONG
With it
Why does this not fire?
local function HandleRespawn(player)
player.CharacterAdded:Connect(function(character)
local spawnLocation = player:GetAttribute("SpawnLocation")
if spawnLocation then
if ServerSettings.Hardcore == true then
PlayerDistances[player.UserId] = 0
end
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
humanoidRootPart.CFrame = spawnLocation
print("Player respawned at checkpoint:", player.Name)
print(PlayerDistances)
local info = {}
player.CharacterAdded:Connect(function()
info.Distance = PlayerDistances[player.UserId]
print(info)
DistanceUpdateEvent:FireClient(player, info)
end)
end
end)
end
It does not work when I try using the CharacterAdded function or whatever. It just doesn't want to fire.
info prints just fine, it all works as expected but the FireClient just doesn't work, eventho later down in the script I fire exactly the same var with the same info and it does work.
how do u make it that colour the script on discord
use 3x ` and add lua after the first line
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ProductPurchasedEvent = ReplicatedStorage:WaitForChild("ProductPurchasedEvent")
MarketplaceService.ProcessReceipt = function(receiptInfo)
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
if player and receiptInfo.ProductId == 3262930693 then
ProductPurchasedEvent:FireServer(player, receiptInfo.ProductId)
return Enum.ProductPurchaseDecision.PurchaseGranted
end
return Enum.ProductPurchaseDecision.NotProcessedYet
end ```
huh
bro
Your function HandleRespawn sets up a CharacterAdded connection, which works the first time the player spawns. But inside that connection, you’re creating another CharacterAdded connection, which will never trigger unless the player respawns again. This is likely your issue.
Do you understand the problem here
You likely intended to do something after the character spawns, not set up a second connection
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ProductPurchasedEvent = ReplicatedStorage:WaitForChild("ProductPurchasedEvent")
MarketplaceService.ProcessReceipt = function(receiptInfo)
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
if player and receiptInfo.ProductId == 3262930693 then
ProductPurchasedEvent:FireServer(player, receiptInfo.ProductId)
return Enum.ProductPurchaseDecision.PurchaseGranted
end
return Enum.ProductPurchaseDecision.NotProcessedYet
end ``` why does this not work its supposed to check if you purchased the product and turn the text label timer to 0
I've tried it without that and it still doesn't properly fire,
Like this:
local function HandleRespawn(player)
player.CharacterAdded:Connect(function(character)
local spawnLocation = player:GetAttribute("SpawnLocation")
if spawnLocation then
--if ServerSettings.Hardcore == true then
-- PlayerDistances[player.UserId] = 0
--end
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
humanoidRootPart.CFrame = spawnLocation
local info = {}
info.Distance = PlayerDistances[player.UserId]
print(info)
DistanceUpdateEvent:FireClient(player, info)
end
end)
end
It prints:
{
["Distance"] = 1
}
As expected, yet in my local script:
local function UpdateUIDistance(info)
print("fired", info)
if info then
if info.Distance or info:isA(string) then
CurrentDistance.Text = tostring(info.Distance) or info
else
CurrentDistance.Text = "WARN, NO NUMBER GIVEN"
warn("No Distance given to", game.Players.LocalPlayer, "error.")
end
else
CurrentDistance.Text = "0"
end
end
DistanceUpdateEvent.OnClientEvent:Connect(UpdateUIDistance)
It does not work, the fired doesn't actually end up printing
Here’s the correct version
local function HandleRespawn(player)
player.CharacterAdded:Connect(function(character)
local spawnLocation = player:GetAttribute("SpawnLocation")
if spawnLocation then
if ServerSettings.Hardcore == true then
PlayerDistances[player.UserId] = 0
end
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
humanoidRootPart.CFrame = spawnLocation
print("Player respawned at checkpoint:", player.Name)
print(PlayerDistances)
local info = {}
info.Distance = PlayerDistances[player.UserId]
print(info)
DistanceUpdateEvent:FireClient(player, info)
end
end)
end
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ProductPurchasedEvent = ReplicatedStorage:WaitForChild("ProductPurchasedEvent")
MarketplaceService.ProcessReceipt = function(receiptInfo)
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
if player and receiptInfo.ProductId == 3262930693 then
ProductPurchasedEvent:FireServer(player, receiptInfo.ProductId)
return Enum.ProductPurchaseDecision.PurchaseGranted
end
return Enum.ProductPurchaseDecision.NotProcessedYet
end ``` why doesnt this work
Try this:
local MarketplaceService = game:GetService("MarketplaceService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ProductPurchasedEvent = ReplicatedStorage:WaitForChild("ProductPurchasedEvent")
MarketplaceService.ProcessReceipt = function(receiptInfo)
local player = game.Players:GetPlayerByUserId(receiptInfo.PlayerId)
if player and receiptInfo.ProductId == 3262930693 then
ProductPurchasedEvent:FireClient(player, receiptInfo.ProductId)
return Enum.ProductPurchaseDecision.PurchaseGranted
end
return Enum.ProductPurchaseDecision.NotProcessedYet
end
your server-side code looks correct if it’s printing the info table with a Distance field. So the problem is definitely on the client side — more specifically, the OnClientEvent connection is never receiving anything.
You're using FireServer from a Server script, which doesn't work in a ServerScript, if you're trying to handle purchases in a LocalScript that won't work in the first place.
Responded to the wrong message lol @sturdy seal
Make sure your local script is located in the right folder too
Yeah, later down in the script I use this tho:
local info = {
Distance = DistanceNumber,
FurthersPlayerDistance = FurthersPlayerDistance,
SectionName = tostring(selectedSection.model)
}
local playerID = player.UserId
PlayerDistances[playerID] = DistanceNumber
DistanceUpdateEvent:FireClient(player,info)
Which does work and prints:
fired ▼ {
["Distance"] = 1,
["FurthersPlayerDistance"] = 1,
["SectionName"] = "section1"
DistanceUpdateEvent must be accessible both on the server and client. That usually means it’s in ReplicatedStorage.
Check that DistanceUpdateEvent is parented to ReplicatedStorage and both scripts are referring to the same instance
You can confirm with
print(DistanceUpdateEvent:GetFullName())
on both server and client to ensure they match.
@somber vault
Yeah it's in ReplicatedStorage
Make sure the LocalScript is running
A LocalScript only runs in:
• StarterPlayerScripts
• StarterCharacterScripts
• StarterGui
• PlayerScripts
• Tools / GUI buttons
If it’s in ServerScriptService, it will do nothing.
No
can someone help me remove everything in backpack
Is UpdateUIDistance being connected before the event fires?
Sometimes the server fires the event before the local script connects to OnClientEvent.
To test, add a delay on the server before firing like so -
task.delay(1, function()
DistanceUpdateEvent:FireClient(player, info)
end)
If this fixes it, your local script is just connecting too late. A better long-term fix would be to store the distance and let the client request it after it’s ready.
It's in StarterGUI
The local script works, and it works fine in the other part in my Script. Yet it's breaking earlier on in the script
Put it in starterplayerscripts
let me try
info:isA(string) is invalid
This line: if info.Distance or info:isA(string) then
info is a table, and :IsA() is only valid on Roblox instances. You’re probably getting a silent error here.
Removed.
This:
task.delay(0.5,function()
DistanceUpdateEvent:FireClient(player,info)
end)
Results in the same issue,
I'm just extremely confused as to why it does work in line 200ish (Exactly the same code mind you!) and does not work in line 140.
I'll try making it a function and see how that goes 🤷
Where is handlerespawn being called
You don’t really need a function to handle an rbxscriptconnection
What’s player:GetAttribute(“SpawnLocation”)?
That doesn’t work if you don’t set it up beforehand
That all does work
Mi amor, the only thing that doesn't work is the distance update part.
I'm figuring out whats up so gimme a sec
was having fun with the basics, its my first "big" code can you rate it?
Figured it out 👌
What happened
Hello, can you help me? I have a rebirth button that i want to use for rebirths. If a player reaches a set amount of stages then the player would be sent at the start but i can't script. Im almost finished with my game. I'll be glad for any help. If you can help please DM me.
Sir have you ever heard of a for loop before?
no havent went there yet, i just used my own idea using repeat
Looks good just use a table to store the colors and you only need to set the material to brick once outside the if statements. Also fix some indentation
i noticed one, also i havent reached tables yet. just practicing with the things i've learned ;-;
Learn for loops and use it to keep your code simple
It was changing the value too quickly after respawning, basically changing the value of the PlayerGUI that was still the "old" one, before respawn. I added a single wait() in the function and it now works for both progressing and for respawning.
Ah alright
You shouldn’t try to make your code complex 😂
For loops and tables are almost hand in hand so I suggest learn both at the same time
Still confused as to why Task.Delay didn't solve it since that's basically doing the same thing
alright
Delay waits outside the thread and then calls the provided function outside the thread
Wait pauses the thread
Delay is parallel
After you got the fundamentals down you can start looking at the Roblox studio API/documentation at create.roblox.com
(or, check the api to help get your fundamentals down (?))
its not teleporting me and i dont know what to do help pls
i am using tutorial videos for now
help
what did i just watch
you can't send that video with no context and say help bro
mb
you have no function that actually teleports the player
Hello, can you help me? I have a rebirth button that i want to use for rebirths. If a player reaches a set amount of stages then the player would be sent at the start but i can't script. Im almost finished with my game. I'll be glad for any help. If you can help please DM me.
fix line 11 of your script
11 or 10...
these forums are for learning to script - people don't script here for you. make an attempt and ask for help when you get stuck
can anyone help my gun isnt shooting
No ones gonna script for you for free bro icl
you use Vale instead of Value multiple times and your syntax is incorrect when you're setting the CFrame of the hrp
What is “valve”?
need more info than that
a spelling bee error
Can you provide a context of sorts
doesnt shoot or make sound or anything like that
I see 😭
Don’t send files
why
Copy paste bud
too long
No ones opening it people are scared of getting a virus
i dont have nitro
We dont want a virus
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local Camera = workspace.Camera
local RunService = game:GetService("RunService")
local uis = game:GetService("UserInputService")
local ViewModel2
local equipped = false
tool.Equipped:Connect(function()
equipped = true
game.ReplicatedStorage.ViewModel2:Clone().Parent = Camera
end)
tool.Unequipped:Connect(function()
equipped = false
ViewModel2 = Camera.ViewModel2
ViewModel2:Destroy()
end)
local swayCF = CFrame.new()
RunService.RenderStepped:Connect(function()
if player.Character.Humanoid.Health <= 0 then
if Camera:FindFirstChild("ViewModel2") ~= nil then
workspace.Camera.ViewModel2:Destroy()
end
end
if equipped == true then
if Camera:FindFirstChild("ViewModel2") ~= nil then
Camera.ViewModel2:SetPrimaryPartCFrame(Camera.CFrame)
for i, v in pairs(Camera.ViewModel2:GetChildren()) do
if v:IsA("BasePart") then
v.CanCollide = false
end
end
local mouseDelta = uis:GetMouseDelta()/50
local swayX = math.clamp(mouseDelta.X, -0.1,0.1)
local swayY = math.clamp(mouseDelta.Y, -0.1,0.1)
swayCF = swayCF:Lerp(CFrame.new(swayX, swayY, 0), 0.2)
Camera.ViewModel2:SetPrimaryPartCFrame(Camera.CFrame * swayCF)
end
end
end)```
oh its short now?
how did that happen
ealierit said too long
That isn’t even near the limit
remote.OnServerEvent:Connect(function(player, hitPart)
if hitPart then
if hitPart.Parent:FindFirstChild("Humanoid") or hitPart.Parent.Parent:FindFirstChild("Humanoid") then
local humanoid = hitPart.Parent:FindFirstChild("Humanoid") or hitPart.Parent.Parent:FindFirstChild("Humanoid")
if hitPart.Name == "Head" or hitPart.Parent.Name == "Hair" then
humanoid:TakeDamage(60)
else
humanoid:TakeDamage(30)
end
end
end
end)```
earlier it said like 1000
too much
maybe i copy and pasted it
Your code is mostly fine in terms of structure, but there’s a critical missing piece: you’re not actually firing the BulletConnection:FireServer() remote event from the client script when clicking/shooting.
There’s no code handling input (like mouse click) to actually detect when the player wants to shoot and then call remote:FireServer(hitPart)
(and you have nothing playing sound; hence why.. you don't hear.. sound)
You need to handle user input (probably Mouse.Button1Down) in the client and raycast from the camera to determine what the gun hit.
🥀🥀🥀
im not good enough to code because im dumb
Just learn the fundamentals and learn the api bro 🥀
losers take
we are all equally dumb
It only takes 3 days to a week
Facts
practice and attempts makes you better
I started when I was 9
keep at it and you're all over it
Im dumb too lol
same im 16 now and idk what im doing
Sweat
I now have 6 years experience at 15 and sometimes I’m still dumb
what are you returning
wait ur me
Maybe
well i have been trying to ask for so long and nobody helps me at all in the #code-help section
Sameee
and i followed the tutorial perfectly i think
See tutorials are bs
bitc as nigas
oh this is wrong script
Add a mouse button detection then
After you get in studio and you wanna make cool stuff you realize that you need to learn for yourself
there are no tutorials on any topics that actually encompass a majority of what u need to know about programming on roblox
Tutorials are useful for seeing code applications but not much after that especially when you’re trying to follow precisely
Just learn lua fundamentals and learn Roblox api that’s literally it
its .txt
After a week you’re somewhat cruising
also i dont know how its a virus in .txt you can see its a script
Inexperienced discord user
you only detect aiming and don't actually do anything with this information
you need to fire your gun when u click button
There’s lots of ways to hide a virus in a txt you should never trust anyone
Just learn programming stynax and basic rules first like functions, variables, tables, etc and you can learn almost any language
well i dont know what to do ill record the script instead then
discord has a built in show entire file system
if you're on pc you can see the txt fine
I’m on my phone right now
based as fuck
Yeah
I mean discord isn’t even made for mobile
For me it was c++ c# and js
the tutorial said to learn using return, even if its not needed
i never got past stage 7
i cba setting up rojo
you need to use it somehow
in order to learn it
i did at the end
Still on stage 6 lmao
You have an animation thats not yours
It’s amazing that I know exactly which tutorial you are using
what one is your guess
i will never ever switch to rojo i will jus skip to stage 13 🤷♂️
its not a guess bro u need to upload the animation from ur game and paste the link there as simple as that
read
"It’s amazing that I know exactly which tutorial you are using"
i said "what one is your guess"
also the animation has nothing to do with my issue
i cant shoot the gun or hear sound or anything like that
sure
its a completely different script haha
if no err then whatever logic ur using its not appropiate
I am at half step stage 13 and 10 at the same time
I failed stage 13 and then quit coding for a long time lmao
i try to teleport
I may fail who knows
Fix your spelling errors
loacation and location are not the same thing
Remove the dot before teleporter
Na im just hella lazy and stupid
Im pretty sure its doable
Yeah with enough dedication
I can say fs I’m strong with JS and C/C++
But C# is weird asl
Oh well js is ez
Python is also easy
Wtf
same error
Bro you didn’t fix anything
C# is DEF more ez than C/C++
i did
Idk all the stuff with the classes confused me
before it was loacation and i chanched to location
Dude its super ez howwwww
😭
C is sooo hard
I js need more time
I guess it’s different for some people
C# is ez asf
C and C++ was easy to pickup
I nodejs need more time
I meant the variable names
you spelled location wrong
You gotta pick one consistent spelling or the compiler won’t know what you’re trying to do
Hmmm i need to pick it up again ig
huh
lol
wym variables
why doesnt thispart work
❔❔
you heard him.
Display name and player name probably aren’t color3 types bro
what is it?
And are displaynane and player name value base types?
Ok
You need to say plrtext.display name.TextColor3 = (color)
You have to index the property
💀
ohh icic
Or the compiler will be confused
okay let me try
i really thought im dumb its a new way to define the properties
?
i still dont understand what im doing wrong
no he used a "." for assigning
Oh
bro made me forgot my whole life
Bro haven’t you been stuck on this for the past 3 hours
yes
🥀🥀
Bro what
this is my 46 run
@vagrant shoal i get this now
and still get errors
damn it
Remove the “.” Before teleported.touched bro
its Color3.new()
Color3.new
You can’t make a color 3 type with just parentheses and numbers
Oh yeah sorry if it was confusing
When you’re setting the color property of the gui
You need to index the property which you did
so do textcolor3.nenw?
so uh whta does that mean
new*
And then assign it a color3 value
what is THAT
i give up
You would do color3.new
No no no this is a simple issue
okok
lmao okay
Color3.new()
teleporter.Touched
Also fix the spelling of the text label name in the code @short nacelle
anyone who doesn't use color3.fromRGB is my opp
I use that too idk why I forgot to tell him
i was abt to say that
i fixed that i think
my opp are those who dont use Colo3.Brickcolor 
It’s DisplayName not Displayname
same error
^^^
You need color3.fromrgb for all 3
and PlayerName
is it a script or localscript
Color3 = Color3.new()
script
Bro why are you listening for touched event on a script instance
@vagrant shoal i did that but it doesnt work now
Just a thought but why not Make it all via code? 👀
wait dont i need to clone the gui
You forgot your equal sign
any error?
wait so i need a local script
Bro what 🥀🥀🥀🥀
For example
or dare idk
Yo y'all, im doing a commission and the guy's paying me 2.5-3k for a full flight system, but ontop of that also made me do a wall destruction script where walls turn into debris and then get regenerated.
Is the pay fine? I'm asking cuz I really don't know
charge him 5k
Id do it for free
ez robuz
6k
aye hmu
😭
Plrtext.DisplayName.TextColor3 = Color3.fromRGB(r, g, b)
This is what it should look like @short nacelle
okay
Aight noted y'all, thx
he will write r,g,b now 😂
just make people pay based on what u think ur worth
Robux?
Hm
That’s chicken change bro
Have u seen his Constants yet? cause maybe bro just isnt even calling to it correctly 😭 idk tho i just got here
What would you say is fair for that?
?
its not working
ive been doing this for 5hr 26mins
i hate physics so i wouldn't do anything for under 200 usd
Bro if you’re making systems and two for that matter you should be charging at least 25k
bruh whats the error post here
@vagrant shoal i did it, no errors but it doesnt work in game the color didnnt change from white to red
idk
its not freakign working
AHJKL:"
unless its bc i didnt clone it
CHECK THE FRIKIN OUTPUT BOX
Send a recording of the running game and screenshots of your scripts
oh my days brother
Hm. Alr, I'll do that next time. Going from 3k to 25k definetly wont work here
all scripts alotgether for the health and playername system?
Bro do you even know how to script
bro delete ur line 1
Charge at least $25
ive been learnign for 2 months now
😛
Alr.
thats all
yeah you need to backtrack
oh dam
But you js asked me what a variable is
there's been a gap in your education
first atleast show the full code 😭
😭
Also ask for a partial payment up front with stuff like this
btw plz tell me u dont use chatgpt to code?
im slow dont blame me
Bro I don’t understand your code
how
“Touched” events are not members of scripts my guy
No habibi i even cannt write local a = script.parent by own
so remove them 💔
chatgpt do it i just enjoy
cframes and vectors
Claude 3.7
it's a part by the looks?
The hit.Parent in this case would be the character right?
Imma give u some advice
chatgpt
use cursor
Alr thx dude
yes
pls do
your brain is rotted
i dont think u can do this with ur brain cells
Just let Cursor do it for u
You have to set the teleport variable to the part you are trying to touch to teleport
or Augment for VSC
soo in stead of touche dwhat to put
what why u using a touch event on a script???!!
@somber vault your location part is not an actual part, it seems to be named LocationScript.
you need a physical object
resolve this first
soo like change it to a local script
No
no - like - make it a part.
hmm
this is fun to watch
you can't teleport to it because it isn't a physical object
My question is how he went 6 hours without realizing this
Low self sufficiency
here right 💓
😭😭
bruh
Good job bro that’s the main issue
yep - now teleport to part1 instead of locationscript
hmm
Set the teleport part to part1
don't give up
wait
And set the location part to part
ignore the shitters i will assist u
Im losing knowledge of how to code just reading this chat
Your variables are defined all wrong
so liek the location should be part and teleport script part 1?
Yes
J, whatcha think of the menu im working on?
6 hours of ya day bro
in your script you are trying to teleport to "TeleportScript", make it teleport to "Part1"
what's going on with ur top bar
what is something i can make for to apply?
Keep in mind i think i been working on my menu for like a couple hours
I added a lot of buttons for fun
anything just try and make a wide use of roblox app
api*
liek dis
Looks fire just polish the top bar a bit
Make it bigger and fit the close button to style
Also use an aspect ratio constraint for the square shape
