My script isn’t working on mobile but it works on computers. There is no UserInputService at all. Is there a way I can fix this?
LocalScript:
script.Parent.MouseButton1Click:Connect(function()
local info = script.Parent.Parent.Parent.Parent.PetInfo
if info.NameSelected then
info.PetImage.Image = script.Parent.Image
info.PetName.Text = script.Parent.Name
info.PetStats.Text = game.ReplicatedStorage.Hats[script.Parent.Name].Boost.Value
game.ReplicatedStorage.Events.GetHatData:FireServer(info.PetName.Text, info.PetStats.Text)
end
end)
Script:
game.ReplicatedStorage.Events.GetHatData.OnServerEvent:Connect(function(plr, hatName, hatBoost)
if script.Parent:FindFirstChild("HatsGui") then
script.Parent.HatsGui.Frame.PetInfo.BoostSelected.Value = hatBoost
script.Parent.HatsGui.Frame.PetInfo.NameSelected.Value = hatName
end
end)