Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Teleporter only shows gui once, but can't show it again?

Hi, I'm trying to make a teleporter which creates a button to go back, but it seems like it does not work properly.. Any help? Cause output won't show anything..

local Enter1 = workspace:WaitForChild("Scriptable"):WaitForChild("Enter")
local Enter2 = workspace:WaitForChild("Scriptable"):WaitForChild("Enter2")
---------------------------------------------------------------------------
Enter1.Touched:Connect(function(hit)
	if hit.Parent:IsA("Accessory") then return end
	if hit.Parent.Humanoid then
		hit.Parent:FindFirstChild("HumanoidRootPart").CFrame = CFrame.new(-169.44, 48.004, -8.307)
		game.Players:FindFirstChild(hit.Parent.Name):WaitForChild("PlayerGui"):WaitForChild("ScreenGui"):WaitForChild("TextButton").Visible = true
	end
end)

Enter2.Touched:Connect(function(hit)
	if hit.Parent:IsA("Accessory") then return end
	if hit.Parent.Humanoid then
		hit.Parent:FindFirstChild("HumanoidRootPart").CFrame = CFrame.new(-169.44, 48.004, -38.051)
		game.Players:FindFirstChild(hit.Parent.Name):WaitForChild("PlayerGui"):WaitForChild("ScreenGui"):WaitForChild("TextButton").Visible = true
	end
end)

1 answer

nevermind! i solved it by putting an identical script into the localscript which is placed in the startergui. :D

This discussion is preserved as it was. New answers, comments, and votes are closed.