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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Minimap help

Previous Thread :: Next Thread 
jhonathan is not online. jhonathan
Joined: 14 Jun 2008
Total Posts: 67
30 Jul 2011 01:48 AM
I have made a large scale model of a gun and need a minimap script. I have used some others in free models, but they don't let the wedges appear. I'm not a free modeler! I only use them when things get too complicated for me such as scripts like this. If you could please help me.
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
30 Jul 2011 02:46 AM
[ Content Deleted ]
Report Abuse
jhonathan is not online. jhonathan
Joined: 14 Jun 2008
Total Posts: 67
30 Jul 2011 03:29 AM
Ok I'll try.
Report Abuse
Fredfishy is not online. Fredfishy
Joined: 21 Mar 2009
Total Posts: 4197
30 Jul 2011 03:43 AM
If you see in the script
if part.className = "Part" or part.className = "Hat"
or something, replace it all with
if part:IsA("BasePart")
Report Abuse
jhonathan is not online. jhonathan
Joined: 14 Jun 2008
Total Posts: 67
30 Jul 2011 04:05 AM
Let me throw this out. I'm a noob when it comes to scripting. I'm a 100 percent builder. I can follow tutorials on stuff, but I just get confused when I try scripting.
Report Abuse
Fredfishy is not online. Fredfishy
Joined: 21 Mar 2009
Total Posts: 4197
30 Jul 2011 07:26 AM
Post the script?
Report Abuse
jhonathan is not online. jhonathan
Joined: 14 Jun 2008
Total Posts: 67
30 Jul 2011 04:47 PM
scale = 1 / 20

local representation = Instance.new("Model")
representation.Parent = script.Parent
representation.archivable = false
representation.Name = "Minimap"

function makeRepresentation(obj, cf, name)
if not obj.archivable then
return
end
if ((obj.className == "Part") or (obj.className == "Seat") or (obj.className == "SpawnLocation")) then
local rep = Instance.new("Part")
rep.formFactor = obj.formFactor
rep.Size = obj.Size * scale
rep.Transparency = obj.Transparency
rep.Reflectance = obj.Reflectance
rep.BrickColor = obj.brickColor
rep.Anchored = true
rep.Locked = false
rep.TopSurface = Enum.SurfaceType.Smooth
rep.BottomSurface = Enum.SurfaceType.Smooth
rep.Shape = obj.Shape
rep.Name = name
mesh = Instance.new("SpecialMesh")
mesh.Scale = obj.Size * scale / rep.Size
local list = obj:GetChildren()
local objMesh = nil
for x = 1, #list do
if (list[x].className == "Decal") then
local copy = list[x]:Clone()
copy.Parent = rep
elseif (list[x].className == "SpecialMesh") or (list[x].className == "CylinderMesh") or (list[x].className == "BlockMesh") then
objMesh = list[x]
end
end
if objMesh ~= nil then
mesh:Remove()
mesh = objMesh:Clone()
if (objMesh.className == "SpecialMesh") and (objMesh.MeshType == Enum.MeshType.FileMesh) then
mesh.Scale = objMesh.Scale * scale
else
mesh.Scale = objMesh.Scale * obj.Size * scale / rep.Size
end
elseif obj.Shape == Enum.PartType.Ball then
mesh.MeshType = Enum.MeshType.Sphere
elseif obj.Shape == Enum.PartType.Block then
mesh:Remove()
mesh = Instance.new("BlockMesh")
mesh.Scale = obj.Size * scale / rep.Size
--mesh.MeshType = Enum.MeshType.Brick
else
mesh.MeshType = Enum.MeshType.Cylinder
rep.Shape = Enum.PartType.Ball
end
mesh.Parent = rep
rep.CFrame = cf:toWorldSpace(obj.CFrame + obj.Position * (scale - 1))
rep.Parent = representation
else
if (obj == workspace) or (((obj.className == "Model") or (obj.className == "Tool") or (obj.className == "Hat")) and (obj ~= representation)) then
local list = obj:GetChildren()
for x = 1, #list do
wait()
makeRepresentation(list[x], cf, name .. "->" .. list[x].Name)
end
end
end
end

local _, t = wait()
print("Making a mini-map...")
makeRepresentation(workspace, CFrame.new(0, 1.2, 0), "Workspace")
local _2, t2 = wait()
print("Mini-map is done! Time taken: " .. t2 - t .. " seconds.")






Again this is not mine. I cannot script.
Report Abuse
Fredfishy is not online. Fredfishy
Joined: 21 Mar 2009
Total Posts: 4197
31 Jul 2011 01:47 AM
Until this moment, I had absolutley no idea what a minimap was. It seems like a good way to create gun models, thank you kind Sir for showing me :P
Anyway, this script would be need to changed QUITE a bit in order to work with wedge meshes. It works by using block meshes, which don't work in a wedge. As an alternative, could you instead CFrame a part so it's like a wedge?

Try
part = Workspace.Handle2
part.CFrame = part.CFrame * CFrame.fromEulerAnglesXYZ(0,math.pi/2,0)

Here we have math.pi/2 as 1/4 of a turn along the Yaw axis. If you want to move things:

part = Workspace.Handle2
part.CFrame = part.CFrame * CFrame.new(0,1,0)

Here we have 1 as 1 along the Y axis. Just like regular positioning, except it allows bricks to go inside other bricks if both are anchored. Useful for weapon making.

Sorry I couldn't help with what you wanted :C
Report Abuse
crazyman32 is not online. crazyman32
Joined: 13 Apr 2008
Total Posts: 18027
31 Jul 2011 03:00 AM
Look off of ROBLOX's radar gear item
Report Abuse
jhonathan is not online. jhonathan
Joined: 14 Jun 2008
Total Posts: 67
31 Jul 2011 05:08 AM
Yess!!! my pistol came out great! I c-framed it just like you said and I like how it turned out! I'll just follow a tutorial on how to make it raycast and it will be done.
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