So I’m trying to do this:
script.Parent.MouseButton1Click(fuction() game.Workspace.AmethystBubble:Delete() end)
But it doesn’t seem to be working, and I’m not sure why. I’ve also tried
scrip.Parent.MouseButton1Click(function() game.Workspace.AmethystBubble.Transparency = 1 end)
Yet it still won’t work. What am I doing wronggg
:Delete() is not a ROBLOX function. There is only one functions to destroy something, and that's :Destroy() as :Remove() is deprecated.
So, your script should look like this.
script.Parent.MouseButton1Click:Connect(function() game:GetService("Workspace"):FindFirstChild("AmethystBubble"):Destroy() end)
If you are calling this from a LocalScript, only the client will see this, not the server. So, not everyone will see this happening.
If you want the server to see this, I recommend using a ServerScript.
Hope this helped! If this answered your question, don't forget to select this as the answer!