I am trying to make a script to when a player clicks e UI will come up. When I hit e nothing happens, no errors, or UI comes up
How do I fix this
local ProximityPromptA = script.Parent.ProximityPrompt
local UI = game.StarterGui.CrateUI.Frame
local player = game.Players.LocalPlayer
ProximityPromptA.Triggered:Connect(function()
UI.Visible = true
end)
Your UI is parented to StarterGui. Since StarterGui automatically clones to PlayerGui, this code won’t work.
Instead try:
local ProximityPromptA = script.Parent.ProximityPrompt
local player = game.Players.LocalPlayer
local UI = player.PlayerGui:WaitForChild("CrateUI").Frame
ProximityPromptA.Triggered:Connect(function()
UI.Visible = true
end)