Is there any way to add atmosphere effect for planets to be affected to player client only not all player clients whenever player go inside the planet it change from space atmosphere to planet atmosphere is it possible do that on Roblox?
In a client script, utilize localPlayerEntered and localPlayerExited to detect when a player enters/exits a zone then apply the respective atmosphere effects to the lighting.
thank you! I was still figuring it out since almost a year
It perfect working for my upcoming project
Elaborate more, and where is the script located at and what is the code used?
I’m making a fe2 fanmade game. This is the code I used for the flood “the code I showed was the code the topic showed.” I modified the code, and now everytime someone dies, they are never allowed on the zone ever again. If you want more information, look at my most recent topic: ZonePlus v3.2.0 Not Working After Death
I have a problem with zone but I want to change clock or time with tweening but somehow it throw me a error…
is there way to get around fix that?
I’m having the same issue for more than one week until now…
Need you to show code and where it’s located at.
Need to show code as well as you may not be doing it correctly.
This script is used for hitbox. (probably not the best idea, but just fits in my case.)
Whenever a projectile is throwed this script is enabled, and first time just works fine, but whenever I die, resetting or not, the script just dies, and doesn’t outputs anything.
local Projectile = script.Parent
local Visual = game.ReplicatedStorage.ToolsSettings.StinkGranade
local Settings = game.ReplicatedStorage.ToolsSettings.Mine
local Tween = game:GetService("TweenService")
local ZonePlus = require(game.ReplicatedStorage.Zone)
local Owner = script.Parent:WaitForChild("Owner").Value
local Survivor = game.Teams.Survivors
local Frog = game.Teams.Frogs
local Players = game.Players
local PlayersInHitbox = {}
local TouchedGround = false
local AlreadyUsed = false
local HitOutline
local HitBox
local HitNew
local IsAdd = false
local ItemInfo = {
-- Sons
GroundSFX = "rbxassetid://379275626",
DamageSFX = "rbxassetid://2648568095",
LaughSFX = "rbxassetid://5445066989"
}
function FirstTouched(t)
if IsAdd == false then
IsAdd = true
HitBox = Visual.Visual.BoxHit:Clone()
HitBox.Parent = Projectile
HitBox.Anchored = true
HitBox.Position = Projectile.Position
HitBox.Smoke.Enabled = true
HitBox.Size = Vector3.new(5, 5, 5)
local VisualScript = Visual.Visual.Visual:Clone(); VisualScript.Parent = HitBox; VisualScript.Enabled = true
Tween:Create(HitBox, TweenInfo.new(1, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out, 0, false, 0), { Size = Vector3.new(30.029, 30.029, 30.029) }):Play()
Projectile.Sounds.Break.TimePosition = 1.25
Projectile.Sounds.Break:Play()
Projectile.Sounds.Gas:Play()
Projectile.Anchored = true
Projectile.Transparency = 1
Projectile.Content.Transparency = 1
Projectile.Tamp.Transparency = 1
Projectile.CanCollide = false
Projectile.Content.CanCollide = false
Projectile.Tamp.CanCollide = false
end
end
function EnteredHitBox(player)
local Character = player
local CurrentPlayer = player.Character
PlayersInHitbox[player] = true
while PlayersInHitbox[player] do
if not PlayersInHitbox[player] then
break
end
player.Character:FindFirstChild("Humanoid"):TakeDamage(5)
local Select = math.random(1, 2)
local Cough = script.Cough:Clone()
Cough.Parent = CurrentPlayer.PrimaryPart
if Select == 1 then
Cough.SoundId = "rbxassetid://6333150436"
else
Cough.SoundId = "rbxassetid://6333150725"
end
Cough.PlayOnRemove = true
Cough:Destroy()
wait(3)
end
end
function LeavedHitBox(player)
local Character = player
local CurrentPlayer = player.Character
PlayersInHitbox[player] = nil
end
Projectile.Touched:Connect(function()
FirstTouched() wait()
HitNew = ZonePlus.new(script.Parent.BoxHit)
HitNew.playerEntered:Connect(function(plr)
EnteredHitBox(plr)
end)
HitNew.playerExited:Connect(function(plr)
LeavedHitBox(plr)
end)
end)
oh sorry!! but I had to use lighting zone that from playground file but idk why it not work with current version that not need to be in folder…
Change your zone module to the latest one and show your script/location after migrating and see if it works.
i’m using latest version but I can try show it tomorrow it late in here for me.
I have an issue using it with streaming enabled, I am currently using ZonePlus for lighting, but it does not work when I have streaming enabled, when it is disabled it works fine, but when it is enabled it does not. I have tried adding WaitForChild() but it doesn’t seem to work too. Any solution for this?
Also, here is the script I’m using for lighting:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Zone = require(ReplicatedStorage.Modules.Zone)
local ZoneController = require(ReplicatedStorage.Modules.Zone.ZoneController)
local Lighting = game:GetService("Lighting")
for i, v in pairs(game.Workspace:WaitForChild("InteriorLights"):GetChildren()) do
local AllParts = Zone.new(v)
AllParts:bindToGroup("AmbientAreas")
AllParts.localPlayerEntered:Connect(function()
Lighting.Ambient = Color3.fromRGB(255, 255, 255)
end)
AllParts.localPlayerExited:Connect(function()
Lighting.Ambient = Color3.fromRGB(70, 70, 70)
end)
end
Hey, I never used an open source project like this and is intrested is this future proof?
Is this recommended for melee hitboxes?
If you track too much items (14 for me) :trackItems() it will completely break and getItems will throw error attempt to index nil with CFrame
getParts() will also return empty array
and events like itemEntered and itemExited wont fire
absolutely essential to complex games, thank you all for the time you put into this free resource!
Starting to get this as well. It can be buggy and inconsistent.