Hello there! I press my shop button buy then this happens in the output: Attempt to concatenate local "Item"( a userdata value)
How do I fix it I have 2 Script one script and one local they are these:
Local:
script.Parent.Parent.Changed:Connect(function() print("TEXTED") local Item = script.Parent.Parent.Parent.Item if Item.Value == 1 then print("djsjsdj") local TextStart = workspace.Shop.StoneHolder.Stone.Object.Value local TextMiddle = workspace.Shop.StoneHolder.Stone.Price.Value local TextFin = "Buy "..TextStart.." - "..TextMiddle script.Parent.Text = TextFin print(script.Parent.Text) print(TextFin) end end) local Stone = workspace.Shop.StoneHolder.Stone local StoneBought = Stone.Bought script.Parent.MouseButton1Click:Connect(function(Player) if StoneBought.Value == false then local Repliacted = game.ReplicatedStorage local Item = "Stone" Repliacted.DataHandler:InvokeServer(Player,Item) StoneBought.Value = true end end)
And the script:
game.ReplicatedStorage.DataHandler.OnServerInvoke = function(Player,Item) print(Item) local Shop = workspace.Shop local Holder = Shop:FindFirstChild(Item.."Holder") local ItemToBuy = Holder.Item local Price = Item.Price local Tea = Player.leaderstats.Tea print(ItemToBuy) local Clone = game.ReplicatedStorage.Item:Clone() Clone.Parent = Player.Backpack end