Hello. I’m working on a tool that has a gui. It’s a phone, so I’ve programmed many things into it. Anyway, I have an imagelabel, for one of my “Applications” for the phone, and when I click on the left side, it doesn’t click. The code works when the imagelabel is parented in startergui, but doesn’t when parented to my gui in my tool. I’m not sure how to solve this, and I’ve tried looking for solutions but I can’t find any. I have 2 videos of this happening. One, when the imagelabel is parented to the screengui in startergui, and the other one in the gui in the tool. I’m not sure if this is due to a bug, a feature, or the buttons themselves. The video shows videos on the right and text and imagelabels on the left. When I equip the tool, its when the gui is in the tool. The other video is when its in startergui.
robloxapp-20220731-1853583.wmv (1.7 MB)
robloxapp-20220731-1904046.wmv (1.2 MB)
Do you have scripts that you can share that control the gui?
In the tool, I do have a localscript that clones the main tool gui to the playergui. This would be the lockscreen (from the video) that takes you to the other gui (the video player thingy) I added a video to show this
Rbxstudiorecord1.html (54.3 KB)
Mind sharing the code?
Also why do you want the UI inside of the tool? I don’t think you can have a UI in a tool and it will work. (unless its a surface UI or smthing like that)
I want it so that the gui shows up when you equip the tool. Here’s the code (watch the video in the 3rd post to know what “gui” is:
local Ui = script:WaitForChild(“Gui”)
script.Parent.Equipped:Connect(function()
local ScreenGui = Ui:Clone()
ScreenGui.Parent = game.Players.LocalPlayer.PlayerGui
end)
script.Parent.Unequipped:Connect(function()
game.Players.LocalPlayer.PlayerGui:FindFirstChild(Ui.Name):Destroy()
end)
Why are you cloning the UI? Just have it in starter GUI and then change the viability or enabled property to false or true depending on if the phone is open or not.
Why is that a html file?? Just send it as a mp4 file.
I used a chrome web extension to record roblox studio. It didn’t let me save it on the computer, so I sent it through gmail and then saved it on my windows computer
@Prerak12345678 try this.
local Tool = script.Parent
local Ui = game.Players.LocalPlayer.PlayerGui:WaitForChild("Gui")
Tool.Equipped:Connect(function()
Ui.Enabled = true
end)
Tool.Unequipped:Connect(function()
Ui.Enabled = false
end)
(local script inside of the tool)
Thank you very much! This did the trick.