I don't know what it is about these lines of code, but the server just doesn't agree with them or something. I can even check while testing the game whether or not the "pressEgui" is in PlayerGui ; it is! Im so flabbergasted i need help.
--// Variables \\--
local part = game.Workspace.Part
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
--gui variables
local eGui = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui").pressEgui.eGui
local basic = game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui").ChooseDifficulty.BasicButton
--// Actions \\--
part.Touched:Connect(function()
if plr.Seated == true then
eGui.Visible = true
end
end)
mouse.KeyDown:Connect(function(Key)
if Key == "e" then
basic.Visible = true
end
end)
basic.MouseButton1Click:Connect(function()
basic.Visible = false
end)
Tysm! error ; pressEgui is not a valid member of playergui

6 comments
Is this a local script? You can only mention PlayerGui inside a localscript.
The server doesnt know who the localPlayer is, and GUIs are cloned from StarterGui to PlayerGui locally
Double check the spelling of the code and the actual GUI
Checked the spelling ; this isn't the whole script.
its whole now C:
Is this a Script or a LocalScript and where is it located?