He already sent what’s in that folder
Please read this thread before responding
He already sent what’s in that folder
Please read this thread before responding
it doesnt delete anything the parts still here,
You’re using zoneplus yes?
Are you trying to delete the children in this folder?
You don’t need to use a for
parameter, you can very easily do this:
Zones:ClearAllChildren()
--removes all children
yes,
roblox limit limit limitlimit limit limit
how do i use it?
robloxlimitlimit
for _,v in ZoneController.getZones() do
print(v) -- your zones are here
end
Yeah, so if you want to remove all children, you don’t need a for
parameter. I just solved your problem.
ZoneController:ClearAllChildren()
no,
that is not what i need to do
Did you read the original post? He’s not trying to delete all the children; he’s trying to create zones from the parts in a folder.
Also, @weakroblox35, that will do nothing because no zones are being created.
Play your game and send a screenshot of the workspace.
Like this?
local RegionTextGui = script:WaitForChild("RegionText")
local RS = game:GetService("ReplicatedStorage")
local Skies = RS:WaitForChild("Skies")
local TweenService = game:GetService("TweenService")
local plr = game:GetService("Players").LocalPlayer
local PlayingSong = game:GetService("SoundService").PlayingSong
local ZonePlus = require(game:GetService("ReplicatedStorage").Modules.Zone)
local ZoneController = require(game:GetService("ReplicatedStorage").Modules.Zone.ZoneController)
local Zones = workspace:WaitForChild("SoundsRegions"):GetChildren()
for _, zone_part in ZoneController.getZones() do
print(Zones)
local trigger = ZonePlus.new(zone_part)
trigger.playerEntered:Connect(function(player)
if player == plr then
TweenService:Create(PlayingSong, TweenInfo.new(.75), {Volume = 0}):Play()
wait(.75)
PlayingSong.SoundId = zone_part.Sound.SoundId
local nextVolume = zone_part.Sound.Volume
TweenService:Create(PlayingSong, TweenInfo.new(.5), {Volume = nextVolume}):Play()
end
end)
end
ZoneController.setGroup("SoundRegions", {
onlyEnterOnceExitedAll = true;
})
ok, it didnt work
limitlimitlimitlimit
Last bet is to read the API’s docs, or use functions in the resource.
no but the thing is, i literally use this script for my other games, and it works perfectly fine
The issue is not that OP isn’t using the module correctly. It’s that there’s nothing in the folder to begin with so no zones are being created.
@Xatiuqe, play your game and send a screenshot of workspace with the SoundsRegions
folder expanded.
i did, like 3 times
Few things.
Code:
--//Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local SoundService = game:GetService("SoundService")
local TweenService = game:GetService("TweenService")
--//Modules
local ZonePlus = require(ReplicatedStorage.Modules.Zone)
local ZoneController = require(ReplicatedStorage.Modules.Zone.ZoneController)
ZoneController.setGroup("SoundRegions", {onlyEnterOnceExitedAll = true})
--//Variables
local PlayingSong = SoundService.PlayingSong
local Skies = ReplicatedStorage:WaitForChild("Skies")
local RegionTextGui = script:WaitForChild("RegionText")
local Zones = workspace.SoundsRegions
--//Functions
local function InitializeSoundRegion(part)
print("Initialized Zone")
local zone = ZonePlus.new(part)
zone.localPlayerEntered:Connect(function(player)
TweenService:Create(PlayingSong, TweenInfo.new(.75), {Volume = 0}):Play()
task.wait(.75)
PlayingSong.SoundId = part.Sound.SoundId
local nextVolume = part.Sound.Volume
TweenService:Create(PlayingSong, TweenInfo.new(.5), {Volume = nextVolume}):Play()
end)
end
Zones.ChildAdded:Connect(InitializeSoundRegion)
for _, zone_part in ipairs(Zones:GetChildren()) do
task.spawn(InitializeSoundRegion, zone_part)
end
Also, why is everyone just saying random things to add to the conversation that aren’t even related? I know you want your solution but please, try to at least help OP instead of asking questions that were already answered, and then proceeding to tell him useless solutions without any actual research.
(Talking to you @weakroblox35 and @DiamondDrencher1)
For individuals joining this thread later who might not wish to read through all the prior messages, it’s important to note that a screenshot of their workspace has already been provided. The issue lies in the fact that the content isn’t replicating to the client or is being deleted. Therefore, it’s crucial to concentrate on comprehending and resolving this specific problem.