yup I just changed this. but now its saying line 6. what does the error message mean?
Where are you indexing screen gui?
local Player = Game.Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui", 15)
local touchpart = game.Workspace:WaitForChild("school for unidenified faries")
local bg = script.Parent
local screenGui = PlayerGui:WaitForChild("ScreenGui", 10)
local exit = screenGui:WaitForChild("modeselectionforunidenifiedfairies", 10):WaitForChild("exit_button", 10)
local farm = screenGui.modeselectionforunidenifiedfairies:WaitForChild("farmingmode", 10)
local mode = screenGui.modeselectionforunidenifiedfairies:WaitForChild("modeselection_text", 10)
local rp = screenGui.modeselectionforunidenifiedfairies:WaitForChild("rpmode", 10)
local story = screenGui.modeselectionforunidenifiedfairies:WaitForChild("storymode", 10)
touchpart.Touched:Connect(function(touch)
if touch.Parent:FindFirstChild("Humanoid") and touch.Parent == game.Players.LocalPlayer.Character then
bg.Visible = true
exit.Visible = true
farm.Visible = true
mode.Visible = true
rp.Visible = true
story.Visible = true
print("Gui opened")
end
end)
ok this is the hopefully fixed code
local Player = game.Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui", 15)
local ScreenGui = game.StarterGui:WaitForChild("ScreenGui")
local touchpart = game.Workspace:WaitForChild("school for unidenified faries")
local bg = script.Parent
local exit = ScreenGui.modeselectionforunidenifiedfairies("exit_button")
local farm = ScreenGui.modeselectionforunidenifiedfairies("farmingmode")
local mode = ScreenGui.modeselectionforunidenifiedfairies("modeselection_text")
local rp = ScreenGui.modeselectionforunidenifiedfairies("rpmode")
local story = ScreenGui.modeselectionforunidenifiedfairies("storymode")
touchpart.Touched:Connect(function(touch)
if touch.Parent:FindFirstChild("Humanoid") and touch.Parent == game.Players.LocalPlayer.Character then
bg.Visible = true
exit.Visible = true
farm.Visible = true
mode.Visible = true
rp.Visible = true
story.Visible = true
print("Gui opened")
end
end)
Hey I apologize, once again I made another edit on the previous post, but you had must of already gotten it, here’s the updated code for you, keep me updated on how it works:
local Player = Game.Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui", 15)
local touchpart = game.Workspace:WaitForChild("school for unidenified faries")
local bg = script.Parent
local screenGui = PlayerGui:WaitForChild("ScreenGui", 10)
local exit = screenGui:WaitForChild("modeselectionforunidenifiedfairies", 10):WaitForChild("exit_button", 10)
local farm = screenGui.modeselectionforunidenifiedfairies:WaitForChild("farmingmode", 10)
local mode = screenGui.modeselectionforunidenifiedfairies:WaitForChild("modeselection_text", 10)
local rp = screenGui.modeselectionforunidenifiedfairies:WaitForChild("rpmode", 10)
local story = screenGui.modeselectionforunidenifiedfairies:WaitForChild("storymode", 10)
touchpart.Touched:Connect(function(touch)
if touch.Parent:FindFirstChild("Humanoid") and touch.Parent == game.Players.LocalPlayer.Character then
bg.Visible = true
exit.Visible = true
farm.Visible = true
mode.Visible = true
rp.Visible = true
story.Visible = true
print("Gui opened")
end
end)
1 Like
OMGGGG IT WORKS TYSM UR THE BEST
1 Like
Have an amazing day! Glad I could finally help.
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.