Code changed
function detector()
script.Parent.Parent:FindFirstChild("Teleport").Visible = true
print(36)
end
script.Parent.MouseButton1Down:Connect(detector)
For some reason, depending on where I click, it does/doesn’t run. Why?
Code changed
function detector()
script.Parent.Parent:FindFirstChild("Teleport").Visible = true
print(36)
end
script.Parent.MouseButton1Down:Connect(detector)
For some reason, depending on where I click, it does/doesn’t run. Why?
Why not use MouseButton1Click
or MouseButton1Down
for PC?
They aren’t working for some reason, and it’s just saying that it’s not a valid member
But the main issue is mobile, as the computer part works. Why does touchtap register when hovering on pc?
What type of instance is this?
is the object a button? if not thats prob why touch is working and not MouseButton1Click
I updated the description, and watch the GIF. It only works if I click in certain parts of the button for some reeason.
can i see the rest of the script and the explorer?
That is the entire script, the explorer is up there in an image as well.
The same script works for stuff without an icon, so I believe it is the fault of the Icon that is above the button
I set both of their zindexs to 0 tho
script.Parent.MouseButton1Down:Connect(function()
if script.Parent.Parent:WaitForChild("Teleport").Visible ~= true then
script.Parent.Parent:WaitForChild("Teleport").Visible = true
end
print(36)
end)