I have a UI button that opens a menu that shows all the badges and if you own one well you can equip it, if you equip it then your chat tag shows up in the chat. So I was wondering if it only shows the chat tag for the client or if all players can see it, if it only shows for the client how could I make it show for all players? (also idk why text color for player is white when badge tag equipping)
#Badge Equips Chat Tag System Only working on Client
1 messages · Page 1 of 1 (latest)
if you're running this through a localscript you'll need a remote event or modulescript in serverscriptservice i think
why a modulescript
1 - you can reuse the logic for each player like a localscript
2 - it's nicer
well how do i do it
take all your code, shove it into a modulescript
do i put it into serversript service
yes
also that makes no sense cause all the ui is built from that local script that goes into starterplayerscripts so would it still build the ui?
** You are now Level 1! **
help
yeah
so
basically
here
lemme draw some boxes
you still use a localscript
just all the logic is in the module
so you get both the tags appearing for everyone and the local ui
im stupid
so I make a module script? and add the local script as a child to it?
what do i put in the module script, and do i put that in serverscriptservice?
yeah
add a remote event to replicated storage too
** You are now Level 5! **
don't forget that
boo 👎
what do i call it
name doesn't matter for that just name it whatever
okay tell me the instructions ill be home in 3 hours or 2 idk
okay
basically for the modulescript, you do something like this
local Players = game:GetService("Players") -- duh
local EquipBadgeEvent = ReplicatedStorage:WaitForChild("EquipBadgeEvent") -- whatever you named the remote
local equippedBadges = {} -- table to track equipped badges
EquipBadgeEvent.OnServerEvent:Connect(function(player, badgeId) -- simple function to equip the badge duh
equippedBadges[player.UserId] = badgeId -- this is optional but you should add it
player:SetAttribute("EquippedBadge", badgeId) -- equips the badge
end)
Players.PlayerRemoving:Connect(function(player) -- when the player is removed, set the equipped badges to nil if you want to
equippedBadges[player.UserId] = nil
end)```
and your localscript will be something like this
so i could just ai to merge that locla script and my ui script?
📜Join my Discord Community if you want scripting help, give feedback, or just hang out:
https://discord.gg/WC6kPu5W5P
🔴Watch My Full Roblox ADVANCED Scripting Tutorial Series:
https://www.youtube.com/playlist?list=PLQ1Qd31Hmi3WKkVHnadvhOOjz04AuMYAf
🎨Watch My Full Roblox GUI Tutorial Series:
https://www.youtube.com/playlist?list=PLQ1Qd...
Learn how to use module scripts on Roblox Studio with this Roblox scripting tutorial. Module Scripts allow you to call functions from different scripts and organise your code. I also go over the _G variable and why you should not use it.
Beginner Scripting Series: https://www.youtube.com/watch?v=BfLUt3mfJiY&list=PLsbxI7NIoTth8CE_os8sog72YTMLPhD...
if u wanna lol
nobody gonna stop you
alr ill try when i get home ty
** You are now Level 2! **
yup go crazy chat
aight
u here? it broke
module script is that
thats badge system in starterplayerscripts
and i have a remote event called BadgeRemote
no idea why it doesnt work
😔
here
idk what that means
😔
basically
press ctrl + shift + F
and type in "OnIncomingMessage"
and it should be in your modulescript
yep
what else
okay that line only works in localscripts
yeah and now what
i dont understand
** You are now Level 3! **
the line "OnIncomingMessage"
only works in localscripts
but its in your modulescript
so like what do i do
put it in your local lol
wahat do i put in
like the line
the whole logic
so i just copy and paste module script into local?
like what lines do i move the local script and where
bros asking me like i know
😭
please help i dont know shit im trying to do everythinnn
@inner ginkgo yo you understand ts?