[SOLVED] SurfaceGui

´

  1. What do you want to achieve?
    Currently working on a SurfaceGui and I’m looking for some example code on client-side and server-side.

Learn about client sided scripts. Don’t really know what else to say because devforum isn’t a place for free code… Also don’t just look for tutorials, try doing it yourself.

5 Likes

Can you show us your script? And maybe some images of what is ocorring?

Oh yea, forgot that.

This will get you a basic understanding of changing it:

local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local SurfaceGui = workspace.Part.BillBoardGui.Textlabel

if Player.Name == "name" then do
       SurfaceGui.Text = "Yes"
   else
       SurfaceGui.Text = "No"
end

DEBOUNCES! Of course!

[30 char]

Client Sided Scripts would work perfectly for you in this situation.

A good start would be to understand how Clients and Servers work.
After you understand this, you should be good to go :wink:

You might’ve not tried that hard, because I found this:

Edit: @Spentity’s link goes to the same thing.

1 Like

Registers for customer service-based games are a rather niche case so I’m not surprised that you weren’t able to find tutorials. You should then be looking to attempt this yourself. Define your requirements and head out to do research. If you can’t because you lack fundamental coding knowledge, it might be a good idea to start brushing up so you have a basis to go off of.

If you don’t want players to be working at the same register, then you need a way to determine that the machine is occupied. You can flip a flag of sorts, like a BoolValue or boolean variable in the script when a user interacts with the machine. The first user to interact has authority over that machine (and can also flip the taken flag off), while other clients see a taken message when they attempt to interact with it.

1 Like