Hey everyone, my LocalScript for one of my latest plugins is basically all ready to go except for one line it keeps failing on [which is the donatescript.Source line in the code]. I’ve attached the most important parts of the script below [I’ve cut out most of it as the rest of the code is functioning fine and anyways I don’t want people actually copying the script] and what happens in the Output.
Script
function click()
local DevProduct = script.Parent.Parent.TextBox
local donatescript = Instance.new("LocalScript")
donatescript.Source = "local id = " DevProduct.Text "\nscript.Parent.TextButton.MouseButton1Click:connect(function() \ngame.MarketplaceService:PromptProductPurchase(script.Parent.Parent.Parent.Parent, id) \nend)"
donatescript.Parent = donatebutton
end
script.Parent.MouseButton1Click:Connect(click)
Output
To help people try and help me solve this: Script:16 = donatescript.Source line in the Script
22:35:31.138 - user_Roblox Fast Donation Button Add [Beta, just messing].rbxmx.Roblox Fast Donation Button Add [Beta, just messing].GUI.TextButton.Script:16: attempt to call a string value
22:35:31.139 - Stack Begin
22:35:31.140 - Script ‘user_Roblox Fast Donation Button Add [Beta, just messing].rbxmx.Roblox Fast Donation Button Add [Beta, just messing].GUI.TextButton.Script’, Line 16 - function click
22:35:31.141 - Stack End
Thanks for reading and hopefully we’ll be able to solve this issue
Try to see if this works. I’ve noticed that you have added quotations for the same line and should use concatenation. Which will merge your string values together into one.