Hi,
I have a simple imageGui script that is intended to print the clicker's name when he or she clicks the button. However it does not print anything when clicked.
local player = game:GetService("Players").LocalPlayer
script.Parent.ImageButton.MouseButton1Down:Connect(function() print(player.Name.." clicked the green play button") end)
Help would be apprieciated
Thanks!
Try this in a LocalScript ofc,
local player = game.Players.LocalPlayer script.Parent.ImageButton.MouseButton1Click:Connect(function() print(player.Name .. " has clicked the button") end)
LocalScript INSIDE your button.
local Player = game.Players.LocalPlayer script.Parent.MouseButton1Down:Connect(function(Print) print(Player.Name.. "has clicked the button!") end)