I know I ask a lot of questions but it is because Roblox studio is weird. Something that should be extremely simple, that even a baby could learn to do that in a second, is Extremely complicated in some cases. Right now, I want to move a simple ScreenGUI that I placed in lighting so that you cannot see it to the playergui section inside of the local player.
My raw script:
local debounce = false local touching = false local shop = game.Lighting.PremiumShop local shopTemp = shop:Clone() --Holds a temporary version of shop
script.Parent.Touched:Connect(function(part) --Detects when the player is on the brick so -- that it can move the GUI
-- I have to learn how to do multi line annotations local hum = part.Parent:FindFirstChild"Humanoid"
if hum then
if not debounce then
debounce = true
touching = true
while touching do
shopTemp.parent = game.Players.LocalPlayer.PlayerGui -- finally moves the GUI to player GUI
end
wait(.5)
debounce = false
end
end
end)
script.Parent.TouchEnded:Connect(function(part)
touching = false
shopTemp:Destroy() -- Destroy's the copy of GUI in the player, to because non-visible again
end)
Why is such a simple script so complicated to do.
Thank you Nachsor

1 comment
.Parent