I felt lazy to make a buttons from a script so I used a plugin that generates objects into a script and then I edited some properties to my liking and I got a error saying:
Workspace.ButtonCreator:4: unexpected symbol near '.'
Is it me who did this wrong or the plugin itself?
If it was me why did I get an error if i'm using the right symbol to access a property?
How do I fix it?
function CreateButtons() ----------------------Button---------------------- local Button = Instance.new("TextButton",game.PlayerGui.ScreenGui) local Button.Style = Enum.ButtonStyle.RobloxRoundDropdownButton local Button.Size = UDim2.new(0.2, 0,0.14, 0) local Button.Text = "PlayerName" local Button.Name = "Button" local Button.Position = UDim2.new(0.08,0,0.13,0) ----------------------ButtonUnderImage---------------------- local Buttonunderimage = Instance.new("Frame",game.PlayerGui.ScreenGui) local Buttonunderimage.Style = Enum.FrameStyle.DropShadow local Buttonunderimage.Size = UDim2.new(0,0,0.13,0) local Buttonunderimage.Name = "ButtonUnderImage" local Buttonunderimage.Position = UDim2.new(0.08,0},{0.14,0) ----------------------PlayerImage---------------------- local PlayerImage = Instance.new("ImageLabel",game.PlayerGui.ScreenGui) local PlayerImage.BackgroundTransparency = 1 local PlayerImage.Image = "rbxassetid://" local PlayerImage.Name = "PlayerImage" local PlayerImage.Position = UDim2.new(0,0,0.13,0) local PlayerImage.Size = UDim2.new(0.08,0,0.14,0) end CreateButtons()
I think your problem is the button is not given a valid parent. Since this is a plugin (I think), you want the button to be in CoreGui. Do this for line 3:
local Button = Instance.new("TextButton", game.CoreGui)