I’ve been working on a roleplay game, and I’ve stumbled upon a unique issue I do not know how to work on.
I’d like to create a Variable Message Board (VBS/VMS) for my highways, which should only be accessible by a specific team I made previously. I understand that creating a completely custom message board system with free text is extremely risky, so I am going after preset icons/messages, to avoid such issues.
That’s pretty much what I have so far. I tried to look through the web for answers, even tried AI which I hate doing, but couldn’t land no where useful, so I am seeking the help of the devforum!
You can detect when the player has interacted with the control box with .MouseButton1Click event of a TextButton.
Then, on the client, you can check if the player is in the specified team by comparing the player’s .Team property to the team that you want to compare with.
For example:
local Teams = game:GetService("Teams")
if player.Team == Teams.teamName... -- Enter the team name, and continue
If the player is a member of the specified team, you can open the options GUI using the .Visible property of a Frame. (or .Enabled of a ScreenGui)
When the player selects the icon, using RemoteEvents, you can do some checks on the server to make sure the player is actually in the correct team, then display the selection that comes with the data sent from the client.
This is pretty simple. You can do the following to make this happen:
Server Script in control box:
local box = script.Parent
local TS = game:GetService("TeamService")
local proximity = box:WaitForChild("Proximity")
proximity.Triggered:Connect(function(player)
if player then
if player.Team == TS.yourteamhere then
player.PlayerGui:WaitForChild("youreditguihere").Enabled = true
end
end
end)
This is very helpful for the Control Box, and I’ll make sure to try it out ASAP. I’ll also try and a dig up a bit more for the decal changing on the actual sign using the UI element. Thank you very much!
All right. What I am going to do is put the different image IDs into a table you can pull from. I am pretty sure this will work, if it doesn’t just get back to me with the errors. This would go in a local script in your GUI. Then you would have to write a server script connected with a remote event to change it on the actual sign.
local image = script.Parent:WaitForChild("Image")
local images = {
"123241431",
"165123123",
"568354342"
}
local arrowButton = script.Parent:WaitForChild("arrowButton")
local stopButton = script.Parent:WaitForChild("stopButton")
local yieldButton = script.Parent:WaitForChild("yieldButton")
local function changeIcon(ID)
image.Image = ID
end
arrowButton.MouseButton1Clicked:Connect(changeIcon(images[1]))
stopButton.MouseButton1Clicked:Connect(changeIcon(images[2]))
yieldButton.MouseButton1Clicked:Connect(changeIcon(images[3]))