Idk what to do anymore, I have made an dev forum already about a part of this situation I’m in rn, which is this:
So I’ve been coding when 0 players are on the baseplate, the baseplate will disappear. But if at least one player are on the baseplate, the baseplate will reappear and spawn in zombies. I thought after the forum I posted earlier everything was solved, no, now, the baseplate won’t even appear and the zombies are also not spawning in as well. I tried to wrap the checking the player int value (where it stores the amount of player on the baseplate) with a while true event, but this leads to my roblox studio crashing and also not working. Can somebody please help me with this problem? I’ve been stuck on this for around 2 hours now. Thank you for reading.
For more details, add a part above the Baseplate make sure Cancollide is false, Cantouch is true and Transparency 1, When the Players enters the zone add a value when the Player leaves the Zone remove the Player
Example Make sure too get your Zone Plus module and add it in ReplicatedStorage and your invisible Part (for the baseplate) name is BaseplateInvisible
After that add a Local script and Paste this code
local Player = game.Players.LocalPlayer
local Zone = require(game:GetService("ReplicatedStorage").Zone)
local BasePlateInvisible = game.workspace.BaseplateInvisible
local zone = Zone.new(BasePlateInvisible)
zone.playerEntered:Connect(function() -- the Player entered the baseplate
-- add a value
end)
zone.playerExited:Connect(function() -- the Player left the baseplate
-- remove a value
end)
I just checked the zone plus out and I don’t really get the module scripts, like there are Janitor and Enum and other confusing scripts. When you say for me to put the zone plus module to my replicated storage, do you mean by the zone plus reference or all of the module scripts.
That’s really weird is the CanTouch to true?
Make sure you are actually touching it.
try making it transparency to 0 if you enter it (quick test incase you aren’t touching it)
and also i just done a quick test and it I am touching the zone, perhaps maybe i put the zone’s module script wrong, here take a look on where i put it:
Try this script (Add a server script in ServerScriptService)
local Players = game.Players
local PlayersValue = game.Workspace.ZombieSwordSawn.players
local InvisibleZone = game.Workspace.InvisibleZone
local Zone = require(game.ReplicatedStorage.Zone)
local zone = Zone.new(InvisibleZone)
zone.playerEntered:Connect(function()
PlayersValue.Value += 1
end)
zone.playerExited:Connect(function()
PlayersValue.Value -= 1
end)