sorry for posting this a lot but its still not solved and so far nothing ive tried works
Im making an effects system but for some reason i have a thing that when touched gives you an effect if you don’t have it but for some reason it only gives the effect once then breaks.
local BloodP = script.Parent.BloodP
BloodP.CFrame = script.Parent.CFrame * CFrame.new(0, 2, 0)
BloodP.Touched:Connect(function(hit)
if hit.Name == "HumanoidRootPart" then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
local buffs = player.PlayerGui.ScreenGui["Buffs/Debuffs"]
print(player)
local found = buffs:FindFirstChild("Frozen")
print(found)
if not found then
print("no frozen")
local Poison = game.ReplicatedStorage["Buff/Debuff"]:Clone()
Poison.Parent = buffs
Poison.Name = "Frozen"
Poison.BDtext.Text = "Frozen"
Poison.time.Value = 5
Poison.amount.Value = 1
else
print("Frozen")
end
end
end
end)
(yes its frozen now)
I tested it with prints and for some reason it keeps running but when the effect goes away and deletes itself the code still thinks that player has the effect. this is in a server script if that changes anything.