Please use a code block next time.
Regular Scripts cannot access the PlayerGui.
To achieve what you are aiming for, you can use RemoteEvents.
First, lets set everything up.
Place a local script inside of the intro frame
Regular Script
local replicatedstorage = game:GetService("ReplicatedStorage")
local event = replicatedstorage:FindFirstChild("ServerGuiAccess")
local plrservice = game:GetService("Players")
if not event then
event = Instance.new("RemoteEvent")
event.Name = "ServerGuiAccess"
event.Parent = replicatedstorage
end
local debounce = false
script.Parent.Touched:Connect(function(hit)
if debounce == true then return end
local plr = plrservice:GetPlayerFromCharacter(hit.Parent)
if not plr then return end
local humanoid = plr.Character:FindFirstChildOfClass("Humanoid")
if not humanoid then return end
debounce = true
local tele = game.Workspace:FindFirstChild("Teleporter1part2")
plr.Character:MoveTo(tele.Position)
event:FireClient(plr)
wait(1)
debounce = false
end)
Local Script
local replicatedstorage = game:GetService("ReplicatedStorage")
local event = replicatedstorage:WaitForChild("ServerGuiAccess")
event.OnClientEvent:Connect(function()
script.Parent.Visible = true
end)
I have just written this outside of studio, so there may be errors.
3 comments
This didint work for me
Then you did it wrong.
Hit me up on discord for help mumble#0040