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

Simple onButton1Down() function not working?

Asked by 9 years ago

What is wrong with this onButton1Down() function? Its supposed to fire when anything in the game is clicked on but it doesn't. What am i doing wrong?

01local sGui=script.ScreenGui
02local frame=sGui.Frame
03local player=game.Players.LocalPlayer
04local mouse=player:GetMouse()
05local pGui = script.Parent.Parent.PlayerGui
06 
07local function onButton1Down()
08    local targ=mouse.Target
09 
10--if part:FindFirstChild("examine")~= nil
11    --then
12    --sGui.Parent = pGui
13   -- frame.Visible=true
14    print("success")
15--else
View all 22 lines...
2
":Connect" should be ":connect" with a lowercase 'c' BlueImagination 45 — 9y
0
Thank you so much!!! Gwolflover 80 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago
01local sGui=script.ScreenGui
02local frame=sGui.Frame
03local player=game.Players.LocalPlayer
04local mouse=player:GetMouse()
05local pGui = script.Parent.Parent.PlayerGui
06 
07function onButton1Down()
08    local targ=mouse.Target
09 
10--if part:FindFirstChild("examine")~= nil
11    --then
12    --sGui.Parent = pGui
13   -- frame.Visible=true
14    print("success")
15--else
View all 22 lines...

Here you go.

Ad

Answer this question