The error occurs one line 9, and i get the error Attempt to call a nil value, Any clues?
--Local Script local plyr = game:GetService("Players").LocalPlayer local mouse = plyr:GetMouse() local part = workspace.SPart mouse.Move:connect(function() if mouse.Target == part then mouse.Icon = "http://www.roblox.com/asset/?id=278931719" if mouse.Target == part and mouse.Button1Down:connect() then script.Parent.Parent.Shop.Frame.Visible = true else mouse.Icon = "http://www.roblox.com/asset/?id=279471758" end end end)
Instead of using mouse.Move use mouse.Button1Down instead.
This will run the script when the player presses the left button down.
Mouse.Button1Down:connect(function() print("Mouse Down") end)
--Local Script local plyr = game:GetService("Players").LocalPlayer local mouse = plyr:GetMouse() local icon = mouse.Icon local part = workspace.SPart mouse.Move:connect(function() if mouse.Target == part then mouse.Icon = "http://www.roblox.com/asset/?id=278931719" else mouse.Icon = icon end end) mouse.Button1Down:connect(function() if mouse.Target == part then script.Parent.Parent.Shop.Frame.Visible = true mouse.Icon = "http://www.roblox.com/asset/?id=279471758" --Where do I put this? end end)
Hope it helps!