Hello,
Here is the code I am trying to resolve:
local UserInputService = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
UserInputService.InputBegan:connect(function(input, gameProcessedEvent)
if input == Enum.UserInputType.MouseButton1 then
print("worked")
for _, v in pairs (script.Parent:GetChildren()) do
if v.Name == "Fruxan_Pistol" then
print("Pistol")
end
if v.Name == "Fruxan_Rifle" then
print("Rifle")
end
if v.Name == "Fruxan_Rocket" then
print("Rocket")
end
end
end
end)
And here is the explorer. This script is located under "Purchasing". https://prnt.sc/vrgggx
I was thinking it was something to do with PlayerGui property or something but I would prefer someone to verify this would be the case and point me in the right direction.
Thanks.

1 comment
And here is the explorer. This script this script t h i s s c r i p t i think thats a typo