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: Studio Plugin Help

Previous Thread :: Next Thread 
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
12 Aug 2011 08:47 AM
How do you get the current part that is selected in the Workspace?

Offline Mode -> In ROBLOX Studio
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
12 Aug 2011 08:48 AM
We can make our plugins now? Thought it would be released next week, anyways use Selection Service.
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
12 Aug 2011 08:50 AM
I tried this, it broke the plugin:



for _,v in pairs(plusbuttonsy:children()) do
v.MouseButton1Down:connect(function()
S = game:service("Selection")
if S then
selected = S:Get()
if selected then
selected.CFrame = selected.CFrame +CFrame.new(0,v.Value.Value,0)
end
end
end)
Report Abuse
ProblemOfficers is not online. ProblemOfficers
Joined: 24 May 2011
Total Posts: 46350
12 Aug 2011 08:52 AM
That should work. Hold on let me try..
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
12 Aug 2011 08:53 AM
You forgot an end.
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
12 Aug 2011 08:54 AM
Oh, lol.
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
12 Aug 2011 08:55 AM
Still doesn't work, want to see the whole script? Warning: It's > 200 lines
Report Abuse
RATEXmegaGAMER is not online. RATEXmegaGAMER
Joined: 10 Dec 2010
Total Posts: 4046
12 Aug 2011 08:56 AM
OK :P Working on a CFrame Plugin?
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
12 Aug 2011 08:59 AM
Yup, I got the script to work again, but I can't see the buttons.

Brace yourself, here it is:












-----------------
--DEFAULT VALUES-
-----------------
loaded = false
on = false
t = 720




---------------
--PLUGIN SETUP-
---------------


self = PluginManager():CreatePlugin()


self.Deactivation:connect(function()
Off()
end)


toolbar = self:CreateToolbar("CFrame")

toolbarbutton = toolbar:CreateButton("", "CFrame Part", "CFrame.png")



toolbarbutton.Click:connect(function()
if on then
Off()
elseif loaded then
On()
end
end)

function On()
self:Activate()
toolbarbutton:SetActive(true)
frame.Visible = true
on = true
end

function Off()
toolbarbutton:SetActive(false)
frame.Visible = false
on = false
end


--screengui
g = Instance.new("ScreenGui", game:GetService("CoreGui"))

--frame
frame = Instance.new("Frame", g)
frame.Position = UDim2.new(0, 0, 0, 200)
frame.Size = UDim2.new(0, 300, 0, 500)
frame.BackgroundTransparency = 0.7
frame.Visible = false

title = Instance.new("TextLabel", frame)
title.Position = UDim2.new(0, 0, 0, 0)
title.Size = UDim2.new(0, 300, 0, 50)
title.Text = "CFrame Part"
title.BackgroundColor3 = Color3.new(0.4, 0.4, 0.4)
title.TextColor3 = Color3.new(0, 0, 0)
title.Font = Enum.Font.ArialBold
title.FontSize = Enum.FontSize.Size36
title.BorderColor3 = Color3.new(0, 0, 0)
title.BackgroundTransparency = 1

plusbuttonsy = Instance.new("Frame", g)

button1 = Instance.new("TextButton", plusbuttonsy)
button1.Position = UDim2.new(0, 0, 0, 100)
button1.Size = UDim2.new(0, 50, 0, 50)
button1.Text = "+.1"
button1.TextColor3 = Color3.new(0,0,0)
button1.BackgroundColor3 = Color3.new(255/255, 255/255, 255/255)
button1.Font = Enum.Font.Legacy
button1.FontSize = Enum.FontSize.Size18
val = Instance.new("IntValue", button1)
val.Value = "0.1"

button2 = Instance.new("TextButton", plusbuttonsy)
button2.Position = UDim2.new(0, 50, 0, 100)
button2.Size = UDim2.new(0, 50, 0, 50)
button2.Text = "+1"
button2.TextColor3 = Color3.new(0,0,0)
button2.BackgroundColor3 = Color3.new(204/255, 236/255, 255/255)
button2.Font = Enum.Font.Legacy
button2.FontSize = Enum.FontSize.Size18
val = Instance.new("IntValue", button2)
val.Value = "1"

button3 = Instance.new("TextButton", plusbuttonsy)
button3.Position = UDim2.new(0, 100, 0, 100)
button3.Size = UDim2.new(0, 50, 0, 50)
button3.Text = "+5"
button3.TextColor3 = Color3.new(0,0,0)
button3.BackgroundColor3 = Color3.new(159/255, 195/255, 233/255)
button3.Font = Enum.Font.Legacy
button3.FontSize = Enum.FontSize.Size18
val = Instance.new("IntValue", button3)
val.Value = "5"

button4 = Instance.new("TextButton", plusbuttonsy)
button4.Position = UDim2.new(0, 150, 0, 100)
button4.Size = UDim2.new(0, 50, 0, 50)
button4.Text = "+10"
button4.TextColor3 = Color3.new(0,0,0)
button4.BackgroundColor3 = Color3.new(102/255, 153/255, 255/255)
button4.Font = Enum.Font.Legacy
button4.FontSize = Enum.FontSize.Size18
val = Instance.new("IntValue", button4)
val.Value = "10"

button5 = Instance.new("TextButton", plusbuttonsy)
button5.Position = UDim2.new(0, 200, 0, 100)
button5.Size = UDim2.new(0, 50, 0, 50)
button5.Text = "+20"
button5.TextColor3 = Color3.new(0,0,0)
button5.BackgroundColor3 = Color3.new(51/255, 102/255, 255/255)
button5.Font = Enum.Font.Legacy
button5.FontSize = Enum.FontSize.Size18
val = Instance.new("IntValue", button5)
val.Value = "20"

button6 = Instance.new("TextButton", plusbuttonsy)
button6.Position = UDim2.new(0, 250, 0, 100)
button6.Size = UDim2.new(0, 50, 0, 50)
button6.Text = "+50"
button6.TextColor3 = Color3.new(0,0,0)
button6.BackgroundColor3 = Color3.new(51/255, 51/255, 255/255)
button6.Font = Enum.Font.Legacy
button6.FontSize = Enum.FontSize.Size18
val = Instance.new("IntValue", button6)
val.Value = "50"


for _,v in pairs(plusbuttonsy:children()) do
v.MouseButton1Down:connect(function()
S = game:service("Selection")
if S then
selected = S:Get()
if selected then
selected.CFrame = selected.CFrame +CFrame.new(0,v.Value.Value,0)
end
end
end
end)


minusbuttonsy = Instance.new("Frame", g)

button21 = Instance.new("TextButton", minusbuttonsy)
button21.Position = UDim2.new(0, 0, 0, 150)
button21.Size = UDim2.new(0, 50, 0, 50)
button21.Text = "-.1"
button21.TextColor3 = Color3.new(0,0,0)
button21.BackgroundColor3 = Color3.new(255/255, 255/255, 255/255)
button21.Font = Enum.Font.Legacy
button21.FontSize = Enum.FontSize.Size18
val = Instance.new("IntValue", button21)
val.Value = "0.1"

button22 = Instance.new("TextButton", minusbuttonsy)
button22.Position = UDim2.new(0, 0, 0, 150)
button22.Size = UDim2.new(0, 50, 0, 50)
button22.Text = "-1"
button22.TextColor3 = Color3.new(0,0,0)
button22.BackgroundColor3 = Color3.new(204/255, 236/255, 255/255)
button22.Font = Enum.Font.Legacy
button22.FontSize = Enum.FontSize.Size18
val = Instance.new("IntValue", button22)
val.Value = "1"

button23 = Instance.new("TextButton", minusbuttonsy)
button23.Position = UDim2.new(0, 100, 0, 150)
button23.Size = UDim2.new(0, 50, 0, 50)
button23.Text = "-5"
button23.TextColor3 = Color3.new(0,0,0)
button23.BackgroundColor3 = Color3.new(159/255, 195/255, 233/255)
button23.Font = Enum.Font.Legacy
button23.FontSize = Enum.FontSize.Size18
val = Instance.new("IntValue", button23)
val.Value = "5"

button24 = Instance.new("TextButton", minusbuttonsy)
button24.Position = UDim2.new(0, 150, 0, 150)
button24.Size = UDim2.new(0, 50, 0, 50)
button24.Text = "-10"
button24.TextColor3 = Color3.new(0,0,0)
button24.BackgroundColor3 = Color3.new(102/255, 153/255, 255/255)
button24.Font = Enum.Font.Legacy
button24.FontSize = Enum.FontSize.Size18
val = Instance.new("IntValue", button24)
val.Value = "10"

button25 = Instance.new("TextButton", minusbuttonsy)
button25.Position = UDim2.new(0, 200, 0, 150)
button25.Size = UDim2.new(0, 50, 0, 50)
button25.Text = "-20"
button25.TextColor3 = Color3.new(0,0,0)
button25.BackgroundColor3 = Color3.new(51/255, 102/255, 255/255)
button25.Font = Enum.Font.Legacy
button25.FontSize = Enum.FontSize.Size18
val = Instance.new("IntValue", button25)
val.Value = "20"

button26 = Instance.new("TextButton", minusbuttonsy)
button26.Position = UDim2.new(0, 250, 0, 150)
button26.Size = UDim2.new(0, 50, 0, 50)
button26.Text = "-50"
button26.TextColor3 = Color3.new(0,0,0)
button26.BackgroundColor3 = Color3.new(51/255, 51/255, 255/255)
button26.Font = Enum.Font.Legacy
button26.FontSize = Enum.FontSize.Size18
val = Instance.new("IntValue", button26)
val.Value = "50"

for _,v in pairs(minusbuttonsy:children()) do
v.MouseButton1Down:connect(function()
S = game:service("Selection")
if S then
selected = S:Get()
if selected then
selected.CFrame = selected.CFrame +CFrame.new(0,v.Value.Value,0)
end
end
end
end)

loaded = true
print("Plugin "CFrame" Loaded")
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
12 Aug 2011 09:00 AM
Wait, I never positioned the Frames :P
Report Abuse
ProblemOfficers is not online. ProblemOfficers
Joined: 24 May 2011
Total Posts: 46350
12 Aug 2011 09:33 AM
Damm Computer, also you lost your BC.
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