Expexted Result:
when mouse click, an image spawned at the position that the mouse clicked
- What is the issue?
there is no images cloned but it ran through the entire script and print “Ya”
local players = game.Players.LocalPlayer
local UIS = game:GetService("UserInputService")
local Mouse = players:GetMouse()
Mouse.Button1Down:Connect(function()
players.leaderstats.Tockens.Value +=1
local po = UIS:GetMouseLocation()
local i = game.StarterGui.ScreenGui.ImageLabel:Clone()
i.Position = UDim2.new(0,po.X,0,po.Y)
i.Parent = game.StarterGui.ScreenGui
i.Visible = true
print("Ya")
end)
Can someone please help me I have been struggling with this for 3 hours