generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Can you not save a object into a plugin?

Previous Thread :: Next Thread 
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
01 May 2014 02:28 PM
14:25:17.599 - Plugin_155570451.AutoBaseplate:22: attempt to call method 'Clone' (a nil value)
This worked fine till I tried to save something to it


local PluginManagerObject = PluginManager()
local Plugin = PluginManagerObject:CreatePlugin()
local Toolbar = Plugin:CreateToolbar("128GB Plugins")
local Button = Toolbar:CreateButton("Auto Baseplate", "", "")

local GUI = script.AutoBaseplateGui
GUI.Parent = Game:GetService("CoreGui")

GUI.Save.MouseButton1Click:connect(function()
if #Game.Selection:Get() > 0 then
if Game.Selection:Get()[1]:IsA("BasePart") then
Plugin:SetSetting("PluginBase", Game.Selection:Get()[1])
end
end
end)

Workspace.ChildAdded:connect(function(Object)
if Object.Name == "Baseplate" or Object.Name == "BasePlate" then
wait(1)
Object:Destroy()
if Plugin:GetSetting("PluginBase") then
local NewBase = Plugin:GetSetting("PluginBase"):Clone()
NewBase.Parent = Workspace
NewBase.Name = "Base"
NewBase.CFrame = CFrame.new(0, 0, 0)
else
local NewBase = script.Base:Clone()
NewBase.Parent = Workspace
NewBase.Name = "Base"
NewBase.CFrame = CFrame.new(0, 0, 0)
end
end
end)

Button.Click:connect(function()
GUI.Save.Visibled = not GUI.Save.Visible
end)
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
01 May 2014 02:31 PM
script.Base does not exist.
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
01 May 2014 02:34 PM
Yes it does, that part works fine.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
01 May 2014 03:18 PM
Base is an object. Objects cannot exist in plugins.
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
01 May 2014 03:26 PM
...
Yes, they can.

They have been able to ever since you upload plugins like a model.
The base part works fine. And my calculator plugin works fine (It clones the gui from the script)
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
01 May 2014 03:31 PM
Oh yeah.. I forgot about that.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image