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

MouseClick1Down is not a valid member of TextButton?

Asked by 4 years ago

I'm making a GUI that only allows a certain player to have. But when I run the script, it says in the output "MouseClick1Down is not a valid member of TextButton". Please check my scripts here.

First script:

function newPlayer(plr)
    if plr.Name == "FrontsoldierYT" then
        game.Lighting.Putmeinlighting.Parent = plr.PlayerGui
    end
end
game.Players.PlayerAdded:Connect(newPlayer)~~~~~~~~~~~~~~~~~

Second script: 

local myPart = Instance.new("Part", game.Workspace) script.Parent.MouseClick1Down:Connect(function(OnClick) end)~~~~~~~~~~~~~~~~~

0
In the first script where it says Second script, It should be for the second script FrontsoldierYT 129 — 4y
1
its MouseButton1Click not MouseClick1Down docrobloxman52 407 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago

There is no MouseClick1Down if u look it down here

RBXScriptSignal Activated ( Instance inputObject ) Fires when the button is activated

RBXScriptSignal MouseButton1Click ( ) Fired when the mouse has fully left clicked the GUI button

RBXScriptSignal MouseButton1Down ( int x , int y ) Fired when the mouse is in the left mouse down state on the GUI object

RBXScriptSignal MouseButton1Up ( int x , int y ) Fired when the left mouse has released the GUI object

RBXScriptSignal MouseButton2Click ( ) Fired when the mouse has fully right clicked the GUI button

RBXScriptSignal MouseButton2Down ( int x , int y ) Fired when the mouse is in the right mouse down state on the GUI object

RBXScriptSignal MouseButton2Up ( int x , int y ) Fired when the right mouse button has been released on a GUI Object

try using

local myPart = Instance.new("Part", game.Workspace) script.Parent.Activated:Connect(function(OnClick) end)~~~~~~~~~~~~~~~~~

or

If left click

local myPart = Instance.new("Part", game.Workspace) script.Parent.MouseButton1Click:Connect(function(OnClick) end)~~~~~~~~~~~~~~~~~

if right click

local myPart = Instance.new("Part", game.Workspace) script.Parent.MouseButton2Click:Connect(function(OnClick) end)~~~~~~~~~~~~~~~~~

If it does not work then message me

MouseClick1Down does not exist thoo check it from here

https://developer.roblox.com/en-us/api-reference/class/TextButton

Ad
Log in to vote
0
Answered by 3 years ago

I made a script for rebirth but I have this error "MouseButton1Ckick is not a valid member of TextButton" can you help me ? The script here >

rebirthButton.MouseButton1Ckick:Connect(function()
    local result = replicatedStorage.Remotes.Rebirth:InvokeServer()

Answer this question