Is anyone having the same problems as I do? I use ZonePlus on LocalClient Script and after I respawn, it seems to break… I’ve searched for possible help here in Scripting Support and the one that I did which is removing the Parts and adding them back works, but ZonePlus just won’t fire events.
I already have a Humanoid.Died connection to which it sets it up back again after respawn, but it just doesn’t work… any help?
I doubt. I have a Humanoid.Died event that updates the zones, now I removed it temporarily because its itching my brain.
I already tried using both localPlayerEntered and playerEntered events of the ZoneModule and seems like it doesn’t really work back again after respawning.
local function setUpZone()
local regionsFolder = game.Workspace.Regions
if not regionsFolder then return end
local Folder = script.Parent.CoreUI.ZoneAnnounceFolder
if not Folder then return end
local UI = script.ZoneAnnounce:Clone()
if not UI then return end
local Text = UI:WaitForChild("Placeholder")
local SubText = UI:WaitForChild("Subtext")
if not (Text and SubText) then return end
for _, zones in regionsFolder:GetChildren() do
local currentZone = ZoneModule.new(zones)
local ZoneTexts = Lib.Zones
local regionFarewells = ZoneTexts.RegionFarewell
local regionNames = ZoneTexts.RegionName
local function tween()
UI.Parent = Folder
Text.TextTransparency = 1
SubText.TextTransparency = 1
tweenModule.Tween(Text, TweenInfo.new(2), {TextTransparency = 0})
tweenModule.Tween(SubText, TweenInfo.new(2), {TextTransparency = 0})
task.wait(2)
tweenModule.Tween(Text, TweenInfo.new(2), {TextTransparency = 1})
tweenModule.Tween(SubText, TweenInfo.new(2), {TextTransparency = 1})
end
currentZone.localPlayerEntered:Connect(function()
if zones.Name == "Test1" then
Text.Text = regionNames[1].Name
SubText.Text = regionNames[1].Tip
tween()
elseif zones.Name == "Test2" then
Text.Text = regionNames[2].Name
SubText.Text = regionNames[2].Tip
tween()
end
end)
currentZone.localPlayerExited:Connect(function()
Text.Text = regionNames[3].Name
SubText.Text = regionFarewells[math.random(1, #regionFarewells)]
tween()
end)
end
end
function setInfo(character)
local plr = ServiceLib["Plr-Service"]
local L_plr = ServiceLib["LocalPlr-Service"]
local Hum = character:WaitForChild("Humanoid")
if not Hum then return end
Hum.Died:Connect(function()
setUpZone()
end)
end
setUpZone() is also called once for it to work on script start up
sorry took me like almost a day to test it out, but apparently, even placing the localScript in StarterCharacterScript doesn’t change the occurrence that whenever I respawn, it doesn’t function again properly.
Instead of using it on a LocalScript, I made the playerEntered and playerExit functions on the server itself and used RemoteEvents to send the Value to the Client to reflect the GUI changes which actually WORKED!
To anyone that is having problems in the future: I guess its better to use the whole ZoneModule in ServerSideScript