Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to fix this SurfaceGui so the TextButton responds to clicks?

Asked by 2 years ago
Edited 2 years ago

Hi! I've been attempting to make a small PDA pad to be used on the player's wrist, the only problem is... it doesn't work! wooo-

Anyways,

The thing is it looks like my script should work, so what's going on? (I'll attach images to visualize what's happening).

Anything is appreciated. (To Add, its in PlayerGui, and the adornee property is set!)

local TS = game:GetService("TweenService")
local Pages = script.Parent:WaitForChild("Screens")
Pages.Screen1.Next.MouseButton1Click:Connect(function()
    --Logo
    TS:Create(Pages.Screen1["SCP Logo"], TweenInfo.new(3), {Position = UDim2.new(0.5,0,0.3,0), Size = UDim2.new(0.3,0,0.3,0)}):Play()
    Pages.Screen1["SCP Logo"].Rotate.Disabled = true
    TS:Create(Pages.Screen1["SCP Logo"], TweenInfo.new(5), {Rotation = 0}):Play()
    --Text
    Pages.Screen1.Standby.Fade.Disabled = true
    TS:Create(Pages.Screen1.Standby, TweenInfo.new(5), {Transparency = 1}):Play()
    TS:Create(Pages.Screen1.TapAnywhere, TweenInfo.new(5), {Transparency = 1}):Play()
    --Screen2Text
    wait(1.5)
    Pages.Screen2.Welcome.Text = "Welcome, "..player.Name
    TS:Create(Pages.Screen2.Welcome, TweenInfo.new(3), {TextTransparency = 0}):Play()
end)

(images): https://imgur.com/a/Kyn2mqY

0
Can you post the image in imgur? It doesn't seem to be letting me look inside the link Xapelize 2658 — 2y
0
For some reason you have to copy and paste the link into a new tab, I'll try changing it to an imgur link tho! DecaSide 0 — 2y
0
I tested it out and it's really weird. It WILL work if you parent it to somewhere else. I have created a part inside a character folder and a surface gui inside a playergui folder. It's not working. But if just move part to workspace, for example, it will work. An excact same part, an excact same script but 2 results. I don't know if it's even possible for character to have surface gui in it MrSuperKrut 167 — 2y
0
Same works for ClickDetector, it's just not working if it is inside character's folder MrSuperKrut 167 — 2y
View all comments (3 more)
0
Ah, I'll try that, thanks! DecaSide 0 — 2y
0
Alright, so I'm able to hover over the button now, and I shows that I click it but nothing happens in the script, like the button was never pressed. DecaSide 0 — 2y
0
Then in must be a mistake in the ui or the script itself bc it works fine for me MrSuperKrut 167 — 2y

Answer this question