Basically, I am using a proximity prompt to fire an event to open the UI. However, after closing the UI, the proximity prompt no longer opens the UI a second time until the user (roblox character) resets.
I am unsure why this happens, therefore I hope somebody can redirect me to a page on roblox creator hub or devforum. Thanks!
local plr = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local SoundService = game:GetService("SoundService")
local sound = workspace.HelpingKo.ProximityPrompt.Script.CallBell
script.Parent.Triggered:Connect(function(plr)
local speak = plr.PlayerGui.DarkPlayer.SpeakingKo
task.wait(0.2)
sound:Play()
task.wait(0.2)
game.ReplicatedStorage.Events.OpenShop:FireClient(plr, speak.Name)
speak:TweenPosition(UDim2.new(0.09, 0, 0.682, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.8)
speak.Visible = true
end)
Since you say making the UI invisible prevents it from going visible again, I’m assuming your code to make it invisible is broken. May you please show that?
script.Parent.MouseButton1Click:Connect(function()
script.Disabled = true
script.Parent.Parent.Parent.Parent.Parent:TweenPosition(UDim2.new(0.09, 0, 1, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Quad, 0.8)
wait(.8)
script.Parent.Parent.Parent.Parent.Parent.Visible = false
end)
this is a localscript under the ui button “bye” which does an animation away and makes it invisible