RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make it so i can redo the function every time triggered"
-- roblox script local proximityPrompt = script.Parent local screenGui = script.Secret local function onProximityTriggered(player) local playerGui = player:FindFirstChild("PlayerGui") if playerGui then local existingGui = playerGui:FindFirstChild(screenGui.Name) if existingGui then existingGui:Remove() end local clonedGui = screenGui:Clone() clonedGui.Parent = playerGui end end proximityPrompt.Triggered:Connect(onProximityTriggered)