You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? I am trying to achieve this script that shows a button or a text label if a player is on mobile or pc.
-
What is the issue? Nothing appears in the output and the BillboardGui is not appearing.
- What solutions have you tried so far? Nothing lol, I think the DevForum will be a better choice.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
local Teams = game:GetService("Teams")
local Players = game:GetService("Players")
local Player = Players.LocalPlayer
local UIS = game:GetService("UserInputService")
local GuiService = game:GetService("GuiService")
if Player.TeamColor == BrickColor.new('Electric blue') then
print("Player is a Cop")
script.Parent.Enabled = false
elseif Player.TeamColor == BrickColor.new('Really red') or Player.TeamColor == BrickColor.new('Lily white') then
print("Player is a Criminal or Citizen")
if UIS.TouchEnabled and not UIS.KeyboardEnabled and not UIS.MouseEnabled
and not UIS.GamepadEnabled and not GuiService:IsTenFootInterface() then
print("Player is on Mobile")
script.Parent.Enabled = true
script.Parent.TextButton.Visible = true
script.Parent.Text.Visible = false
elseif not UIS.TouchEnabled and UIS.KeyboardEnabled and UIS.MouseEnabled
and not UIS.GamepadEnabled and not GuiService:IsTenFootInterface() then
print("Player is on PC")
script.Parent.Enabled = true
script.Parent.TextButton.Visible = false
script.Parent.Text.Visible = true
else
print("Nil")
end
end