Pretty simple to understand ; I have a seat in a boat ; I have the boat in a huge transparent block with cancollide off and anchor on . when you enter the block it checks if ur seated then if u are pops up a Gui and if you press e while it is on screen it dissapears and pops a new gui.. you can see the script ;
--// Variables \\-- local part = script.Parent local plr = game.Players.LocalPlayer local mouse = plr:GetMouse() local f = false local t = true --gui variables local eGui = game.StarterGui.pressEgui.eGui local basic = game.StarterGui.ChooseDifficulty.BasicButton --// Actions \\-- part.Touched:Connect(function() if plr.Seated == t then eGui.Visible = t end end) mouse.KeyDown:Connect(function(Key) if Key == "e" then basic.Visible = t end end) basic.MouseButton1Click:Connect(function() basic.Visible = f end)
if u need any more info to reslove my issue please comment nothing in output comes up :/
Your gui variables seems to be wrong which is line #15 and #17, You stored a service which is StarterGui
in both variables. So it is changing the visibility of your eGui
in the service not locally. So, store game:GetService("Players").LocalPlayer:WaitForChild("PlayerGui")
so it would change locally.