Hello, I’ve been making an “Objectives” system for my game,
it works by server scripts firing a remote event to every player, after that the local script in every player add the new “Objective” on their UI.
the Objectives can get completed when the players (click a designated part or enter in a designated “Region3”), so lets say that a player click on the needed button to complete his Objective after clicking another remote event would be called telling the local scripts to clear the Objective on the UI,
the first objective uses a Region3 to get completed:
the problem is that for some reason the reagion3 sometimes work and some other times does not:
here it worked:
and here it did not work, but it did worked if I reset in the region3 box
the region3 works with a simple sever script inside of the part:
local part = script.Parent
local region = Region3.new(part.Position - part.Size/2, part.Position + part.Size/2)
local BillBoards = game:GetService("Workspace"):WaitForChild("Game"):WaitForChild("BillBoardParts")
while true do
local parts = workspace:FindPartsInRegion3(region, part)
for i, part in pairs(parts) do
local player = game.Players:GetPlayerFromCharacter(part.Parent)
if player then
print(player.Name)
game.ReplicatedStorage.RemoteEvents.Players.ObjComplete:FireAllClients(player.Name,"Go to the conference room for further instructions",BillBoards:WaitForChild("ConfRoom"))
end
end
wait(1)
end
oh yes and also I checked the output and when it doesn’t work it does not print the player’s name so the problem should be in the region3 script…