parent.MouseButton1Click:connect(function() if game.Players.LocalPlayer.Backpack.EarthOrb then game.Players.LocalPlayer.Backpack.EarthOrb.parent = game.ReplicatedStorage game.ReplicatedStorage.FireOrb.Parent = game.Players.LocalPlayer.Backpack end)
You didn't close your if statement. Here's what it should look like:
parent.MouseButton1Click:connect(function() if game.Players.LocalPlayer.Backpack.EarthOrb then game.Players.LocalPlayer.Backpack.EarthOrb.Parent = game.ReplicatedStorage game.ReplicatedStorage.FireOrb.Parent = game.Players.LocalPlayer.Backpack end end)
Also, if you have FilteringEnabled on and this is from a LocalScript (I'm assuming it is), you should use RemoteEvents.
This is what is called a syntax error. You're in luck because these are the easiest to fix but you probably shouldn't be asking it here seeing as a quick double check would most likely allow you to identify the problem...
The simple problem here is that your if
statement does not have an end
.