So, I was working on the magic game "Elemental Magic", I was planning a magic called Sand Magic to have full spell moveset in a GUI, then it works. Suddenly this is the hardest part, cloning it to the PlayerGui.
local UIS = game:GetService("UserInputService")
local s = true
local player = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local gui = player:WaitForChild("PlayerGui")
script.Parent.Equipped:Connect(function()
local sand = script.Parent.Handle:WaitForChild("Sand")
sand.Parent = gui
sand.Enabled = true
script.Parent.Unequipped:Connect(function()
sand.Parent = script.Parent.Handle
end)
end)
I tried the Destroy method, instead it errors the GUI by the spells not making it do it.

4 comments
Who is the Script???
put "script.Parent.Unequipped:Connect(function()" outside.
and put "local sand = script.Parent.Handle:WaitForChild("Sand")" above equipped and unequipped function
yes