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

MouseButton1Click isn't valid member of TextButton?

Asked by 4 years ago

So it says Mouse MouseButton1Click isn't valid member of TextButton but its a Text button so why doesn't it work?

local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Camera = workspace.CurrentCamera


script.Parent.Mousebutton1Click:Connect(function()
    script.Parent.Parent.Parent:WaitForChild("Frame").Visible = true
repeat wait()
    Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
    Camera.CFrame = workspace.CameraPart.CFrame
    script.Parent.Frame.TextButton.MouseButton1Click:Connect(function()
        script.Parent.Frame.Visible = false
    end)



    end)

1 answer

Log in to vote
0
Answered by 4 years ago

Accept this answer because it's so good.

script.Parent.MouseButton1Click:Connect(function()

You wrote a lowercase "b" silly

1
Ohhhhhh Oof jhjryoutube 29 — 4y
0
accept pls Gey4Jesus69 2705 — 4y
Ad

Answer this question