I am making a point capture system and the bindable event that tells the gui’s script the current status of the point that the player is at is not being received by the script
No errors are in console (attached).
Console (After all the 'wait()'s)
Script 1 (this script fires the event; some parts of the script were removed)
script.Parent.Part.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local plr = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
if plr then
if table.find(inZone,plr.Name) then
print("Already in zone.")
else
local plrTeam = tostring(plr.Team)
if plr.PlayerGui:FindFirstChild("CaptureGui") then
plr.PlayerGui["CaptureGui"]:Destroy()
end
local gui = script.Parent.CaptureGui:Clone()
for _,v in pairs(gui:GetChildren()) do
if v.ClassName == "BindableEvent" then
if v:GetAttribute("sussy") then
local a = v:GetAttribute("sussy")
if a == "secretIdentificationCode" then
print('found manage remote uwu')
clonedRemote = v
end
end
end
end
wait(.01)
if plrTeam == script.Parent.CapturedBy.Value then
clonedRemote:Fire("owned",script.Parent.CapturePercentage.Value)
else
if plrTeam == script.Parent.CapturingBy.Value then
clonedRemote:Fire("notOwned",script.Parent.CapturePercentage.Value,script.Parent.CapturingBy.Value,true)
else
clonedRemote:Fire("notOwned",script.Parent.CapturePercentage.Value,script.Parent.CapturingBy.Value,false)
end
end
end
end
end
end)
Script 2 (this script receives the event; some parts were removed)
local namesAlreadyDone = function()
wait(3)
for _,v in pairs(script.Parent:GetChildren()) do
if v.Name == "" then
return true
else
return false
end
end
end
local nameSetting = function()
local succ,err = pcall(function()
ManageRemote.Name = ""
decoyRemote1.Name = ""
decoyRemote2.Name = ""
decoyRemote3.Name = ""
decoyRemote4.Name = ""
print("name setting done")
end)
end
if namesAlreadyDone() == false then
local succ,err = pcall(function()
ManageRemote = script.Parent.Manage or nil
decoyRemote1 = script.Parent.Decoy or nil
decoyRemote2 = script.Parent.OtherDecoy or nil
decoyRemote3 = script.Parent.L or nil
decoyRemote4 = script.Parent.Haha or nil
nameSetting()
end)
end
for _,v in pairs(script.Parent:GetChildren()) do
if v.ClassName == "BindableEvent" then
if v:GetAttribute("sussy") then
local a = v:GetAttribute("sussy")
if a == "secretIdentificationCode" then
ManageRemote = v
print(a)
end
end
end
end
print(ManageRemote:GetAttribute("sussy"))
ManageRemote.Event:Connect(function(o,p,cb,c)
print("called")
Explorer
If you need anything else, just ask. I included the parts of the scripts that I thought were relevant.