local PluginManagerObject = PluginManager()
local Plugin = PluginManagerObject:CreatePlugin()
local Toolbar = Plugin:CreateToolbar("Seat to Part Plugin")
local Button = Toolbar:CreateButton("Seat > Part","Transform a seat to a part in just a few clicks!","http://www.roblox.com/asset/?id=516644664")
print("Seat to Part plugin loaded")
Button.Click:connect(function()
local exist = game.CoreGui:findFirstChild'Info'
if(exist==nil)then
local gui = Instance.new("ScreenGui",game.CoreGui)
gui.Name = "Info"
local txt = Instance.new("TextLabel",gui)
txt.Name = "HelpText"
txt.Size = UDim2.new(1,0,0,25)
txt.TextStrokeTransparency = 0
txt.TextColor3 = Color3.new(1,1,1)
txt.Text = "Click on a vehicle seat to transform it into a part"
txt.BackgroundTransparency = 1
else
game.CoreGui.Info:Destroy()
end
local set = game:GetService("Selection")
set.SelectionChanged:connect(function()
local exist = game.CoreGui:findFirstChild'Info'
if(exist~=nil)then
print("exists")
if set.ClassName == "Seat" or set.ClassName == "VehicleSeat" then
print("is seat")
local p = Instance.new("Part")
p.BrickColor = set.BrickColor
p.Material = set.Material
p.Reflectance = set.Reflectance
p.Transparency = set.Transparency
p.Name = set.Name
p.Parent = set.Parent
p.CustomPhysicalProperties = set.CustomPhysicalProperties
p.Anchored = set.Anchored
p.Archivable = set.Archivable
p.CanCollide = set.CanCollide
p.Locked = set.Locked
p.Shape = set.Shape
p.Size = set.Size
p.BackParamA = set.BackParamA
p.BackParamB = set.BackParamB
p.BackSurfaceInput = set.BackSurfaceInput
p.BottomParamA = set.BottomParamA
p.BottomParamB = set.BottomParamB
p.BottomSurfaceInput = set.BottomSurfaceInput
p.FrontParamA = set.FrontParamA
p.FrontParamB = set.FrontParamB
p.FrontSurfaceInput = set.FrontSurfaceInput
p.LeftParamA = set.LeftParamA
p.LeftParamB = set.LeftParamB
p.LeftSurfaceInput = set.LeftSurfaceInput
p.RightParamA = set.RightParamA
p.RightParamB = set.RightParamB
p.RightSurfaceInput = set.RightSurfaceInput
p.TopParamA = set.TopParamA
p.TopParamB = set.TopParamB
p.TopSurfaceInput = set.TopSurfaceInput
p.BackSurface = set.BackSurface
p.BottomSurface = set.BottomSurface
p.FrontSurface = set.FrontSurface
p.LeftSurface = set.LeftSurface
p.RightSurface = set.RightSurface
p.TopSurface = set.TopSurface
p.CFrame = CFrame.new(set.Position)
p.Rotation = set.Rotation
p.RotVelocity = set.RotVelocity
p.Velocity = set.Velocity
print("config done")
set:Destroy()
print("origin demolished")
end
end
end)
end)
Basically, what I'm tryna do, is I'm tryna make it so ya click on the plugin button in the tray bar, then ya click on the seat that ya wanna transform into a part, then it'll transform it into a part. However, this doesn't work. When I select the part after clickin' on the button, it only prints "exists", not "is seat". How can I fix this?

2 comments
bump (does that work here?
No, old unanswered posts are automatically recycled to the top of the queue.