I do not know what is going wrong here can someone please help explain it?
script.Parent.MouseButton1Click:Connect(function()
for i,v in pairs(game.Players:GetDescendants()) do
if v:IsA("Player") then
local highlightnew = game.ReplicatedStorage.Highlight:Clone()
highlightnew.Parent = v.Character
end
end
task.wait(3)
for i,v in pairs(game.Players:GetDescendants()) do
if v:IsA("Player") then
v.Character.Highlight:Destroy()
end
end
end)
Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.
What happens is in another script I clone a gui into another gui and when that happens iot says the message, the funny thing is that this script has nothing to do with it and is not in the same screen gui or being cloned but it has the same script as the item being clone but I do not know why it is being brought up.
local info = script.Parent.Parent.Parent.Info.Frame
script.Parent.MouseButton1Click:Connect(function()
info.desc.Text = script.Parent.Desc.Value
info.name.Text = script.Parent.Name
info.image.Image = script.Parent.Frame.image.Image
local newbtn = game.ReplicatedStorage.Abilitesbtn.See:Clone()
newbtn.Parent = script.Parent.Parent.Parent.Parent.Parent.Ability
for i,v in pairs(script.Parent.Parent.Parent.Parent.Parent.Ability:GetDescendants()) do
if v:IsA("ImageButton") then
v:Destroy()
end
end
end)