Ahh Idk why it give exucation time error, I tried to look multiple firing but 1 line look suspicious
And I tried to remove this line then it works but Why it gives error I just setting parent to model.PrimaryPart
local HealthUIF = game.ReplicatedStorage.Events.AtobjClient
local HealthUIFr = game.ReplicatedStorage["Health Gui"]
local OldFr = nil
HealthUIF.OnClientEvent:Connect(function(Model, Debounce)
if OldFr ~= nil then
OldFr:Destroy()
end
script.Parent.Handle.Beam.Attachment1 = nil
if Debounce == 1 then
local CloneUI = HealthUIFr:Clone()
OldFr = CloneUI
CloneUI.Parent = Model.PrimaryPart -- This line
CloneUI.Placed.Value = true
script.Parent.Handle.Beam.Attachment1 = Model.PrimaryPart.Attachment
end
end)