script.Parent.Touched:Connect(function(h) local hum = h.Parent:FindFirstChild("Humanoid") if hum ~= nil then h.Parent.HumanoidRootPart.CFrame = CFrame.new(workspace["Teleporter1part2"].Position) local Intro = game.StarterGui.Message.Introduction Intro.Visible = true end end)
I wanted to make the brick teleport you and then make the text label so you can see it but is not working pls help. Also, this is a regular script, not a local script
The StarterGui is not what the player sees. It is simply how the server knows what to put in each player's PlayerGui.
You're gonna have to do this:
local player = game:GetService("Players"):GetPlayerFromCharacter(h.Parent) player.PlayerGui.Message.Introduction.Intro.Visible = true
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) --shorter way of teleporting character event:FireClient(plr) -- sends a signal to the client 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.