What is wrong with my script?

hmm let me try restarting my PC cause I still get the same issue

Idk still same thing D:

local ProximityPrompt = script.Parent
ProximityPrompt.Triggered:Connect(function(player)
	if player.PlayerGui:FindFirstChild("MissionGUI1") ~= nil then return end
	local missionGiver = script.Mission1GUI:Clone()
	missionGiver.Parent = player.PlayerGui
end)

https://gyazo.com/1568ce827208e9891aa867b3437b85de

[edit]: didnā€™t see your change, itā€™s working now. What was wrong with the return end though?

Thatā€™s weird. Lets try again , hopefully itā€™s gonna work.

Try these:

local ProximityPrompt = script.Parent
ProximityPrompt.Triggered:Connect(function(player)
	if not player.PlayerGui:FindFirstChild("Mission1GUI") then
		local missionGiver = script.Mission1GUI:Clone()
		missionGiver.Parent = player.PlayerGui
	end
end)
local ProximityPrompt = script.Parent
ProximityPrompt.Triggered:Connect(function(player)
	if  player:WaitForChild("PlayerGui"):FindFirstChild("Mission1GUI") == nil then
		local missionGiver = game.ReplicatedStorage.Mission1GUI:Clone()
		missionGiver.Parent = player.PlayerGui
	end
end)

I edited my post above ^ itā€™s actually working I didnā€™t notice your changes you made. But any idea why

ā€™ ```
if not player.PlayerGui:FindFirstChild(ā€œMission1GUIā€) then

1 Like

Glad to know :slight_smile: If it helped[hopefully :wink: ], please mark it as a solution:)

Best of luck!

Oh what the heck ROBLOX deleted half my post lol, any idea why that works and not returning?