#Gui not appearing in zone after reset. (uses zoneplus module)

1 messages · Page 1 of 1 (latest)

dusky wyvern
#
local zones = require(game.ReplicatedStorage.Packages.Zone)

local folder = workspace:WaitForChild("Zones")

local auras = zones.new(folder:WaitForChild("AuraZone"))

local plrGui = game.Players.LocalPlayer.PlayerGui

local aurasGui = plrGui:WaitForChild("Auras").Frame

local tweenService = game:GetService("TweenService")

local localPlayer = game.Players.LocalPlayer

local function tweenAura(frame, bool)
    local size
    if bool == true then
        size = UDim2.new(0.519, 0,0.519, 0)
        frame.Size = UDim2.new(0,0,0,0)
    else
        size = UDim2.new(0,0,0,0)
    end
    local tween = tweenService:Create(frame, TweenInfo.new(0.25), {Size = size})
    tween:Play()
    
    if not bool then
        tween.Completed:Once(function()
            frame.Visible = false
            frame.Parent.Enabled = false
        end)
    end
    
end

auras.playerEntered:Connect(function(player)
    if player ~= localPlayer then return end
    aurasGui.Visible = true
    tweenAura(aurasGui,true)
end)

auras.playerExited:Connect(function(player)
    if player ~= localPlayer then return end
    tweenAura(aurasGui,false)
end)

localPlayer.CharacterAdded:Connect(function(char)
    aurasGui.Visible = false
    aurasGui.Parent.Enabled = false
end)```
split topaz
#

hypothetically

#

don't use zoneplus

dusky wyvern
dense prairie
#

realistically

#

dont use zoneplus

dusky wyvern
#

discord users cannot be funny even if their life was on the line

split topaz
#

ur a discord user

quiet patrol
dusky wyvern
#

never fixed it

#

doesnt hurt the functionality so why would I

quiet patrol
#

What does output show

dusky wyvern
#

nothing

#

no error

#

and for some odd reason when another player dies

#

the gui is able to be activated again

#

I might just switch from zoneplus to just using a proximity prompt even though it would be 10x worse

split topaz
#

not to be downright disrespectful but you're kinda dense

#

zoneplus isn't going to magically solve shit and you don't have to use proximity prompts

#

the same feature as "zone plus" is literally just a simple ass touched event on a shaped part

dusky wyvern
#

Touched is kinda ass for detecting if a player is in a area dont you think?

#

unless im using it wrong

split topaz
#

it's only ass if you're expecting it to be precisely on-time

#

cuz roblox physics is garbage

tender pewter
#

cosmic

split topaz
#

otherwise it's gonna save more resources than anything else

dusky wyvern
quiet patrol
#

Soo much things i wanna say

tender pewter
#

disable "ResetOnSpawn" property on the screengui

split topaz
dusky wyvern
dusky wyvern
#

I knew taking a 2 month break would be horrible

#

forgot you could do that

dusky wyvern
quiet patrol
#

Btw

civic sailBOT
#

studio** You are now Level 4! **studio

split topaz
quiet patrol
#

You disable the gui when player joins

split topaz
#

basically an overengineered helper function

quiet patrol
#

And never enable it again

tender pewter
#

true

dusky wyvern
#

@quiet patrol

dusky wyvern
#

thank you

quiet patrol
#

Worked?

dusky wyvern
#

yeah

quiet patrol
#

Theres more to it but im lazy to point out

#

Keep practicing

dusky wyvern
#

right

quiet patrol
#

You mentioned that when some player dies

#

Your ui is visible?

dusky wyvern
#

no

#

when they die

#

for some reason it started working again

#

i switched to local zones

#

since i had no idea they existed

#

but now i do

dusky wyvern
#

cant even award stats if a player is in a zone

#

too exploitable

tender pewter
#

that's because you manage it bad