Teleporter GUI for my Training Center

Hi people of Cookie Tech!
I am currently in the process of creating V2 of my Training Center in my Bakery.
As the title suggests, I would like to create a teleporter GUI for MR+ to use.
I have researched from tutorials to looking through forms yet I can’t get a hang of it.
I would appreciate if anybody can help!
Thanks!

Hey there what problem are you having with it?

It’s like that it won’t appear, the GUI. And I’m not the best scripter so that might also be why.

If you’re attempting to open it via button one way is to make a LocalScript inside the button and add:


local gui = script.Parent.Parent.Frame — 

script.Parent.Button.MouseButton1Click:Connect(function()
   gui.Visible = true;
end)

Or if you want to make it toggibal you can:


local gui = script.Parent.Parent.Frame -- The frame
local button = script.Parent -- Our open/close button

button.MouseButton1Down:Connect(function() -- Whenever the player clicks the button
	if gui.Visible == false then -- Checks if the frame is not visible
		gui.Visible = true -- makes it visible
        button.text = “Close”
	else 
		gui.Visible = false
        button.Text = “Open”
	end
end)

Yes, that does seem to work, but how would I make it to where a certain group rank can only click on it?

What does the script you created contain?

Here is the updated including the rank lock for the above script:


local gui = script.Parent.Parent.Frame -- The frame
local button = script.Parent -- Our open/close button
local plr = game.Players.LocalPlayer;
const groupId = 0 — Your group ID
const minRankId = 0 — The minimum rank that can use it

button.MouseButton1Down:Connect(function() -- Whenever the player clicks the button
      if plr:GetRankInGroup(groupId) >= minRankId then
	if gui.Visible == false then -- Checks if the frame is not visible
		gui.Visible = true -- makes it visible
        button.text = “Close”
	else 
		gui.Visible = false
        button.Text = “Open”
	end
   end
end)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.