PhyclopsJoin Date: 2012-09-27 Post Count: 5895 |
local bin = script.Parent
local shelter = game.ReplicatedStorage.Shelter
local amt = bin:FindFirstChild("Amount")
local ghost = nil
function makeGhost()
ghost = shelter:clone()
ghost.Parent = game.Workspace.CurrentCamera
ghost:MakeJoints()
ghost.PrimaryPart=ghost.MainPart
local g = ghost:GetChildren()
ghost:SetPrimaryPartCFrame(bin.Parent:FindFirstChild("Torso").CFrame - bin.Parent:FindFirstChild("Torso").Position) -- here is the part where I need fixing, it sets the models rotation to the torsos rotation, but it rounds it to the nearest 90 degress angle, i also need to reselect the tool to update the rotation to my torsos rotation.
for i = 1,#g do
if g[i]:IsA("Part") then
g[i].Transparency = 0.7
g[i].BrickColor = BrickColor.new("Lime green")
g[i].CanCollide = false
end
end
end
function onButton1Down(mouse)
ghost:Destroy()
local model = shelter:clone()
model.Parent = game.Workspace
model:MakeJoints()
model:MoveTo(mouse.Hit.p)
local f = model:GetChildren()
for i = 1, #f do
if f[i]:IsA("Part") then
f[i].Anchored = true
end
end
amt.Value = amt.Value - 1
if amt.Value == 0 then
bin:Destroy()
if ghost then
ghost:Destroy()
ghost = nil
end
end
makeGhost()
end
bin.Equipped:connect(function(mouse)
makeGhost()
mouse.Move:connect(function()
if ghost then
mouse.TargetFilter = ghost
ghost:MoveTo(mouse.Hit.p)
end
end)
mouse.Icon = "rbxasset://textures\\GunCursor.png"
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end)
bin.Unequipped:connect(function()
if ghost then
ghost:Destroy()
end
end)
|
|
|
PhyclopsJoin Date: 2012-09-27 Post Count: 5895 |
bin.Parent:FindFirstChild("Torso").Position) -- here is the part where I need fixing, it sets the models rotation to the torsos rotation, but it rounds it to the nearest 90 degress angle, i also need to reselect the tool to update the rotation to my torsos rotation.
i mentioned this |
|
PhyclopsJoin Date: 2012-09-27 Post Count: 5895 |
bump |
|
PhyclopsJoin Date: 2012-09-27 Post Count: 5895 |
? |
|
PhyclopsJoin Date: 2012-09-27 Post Count: 5895 |
? |
|
PhyclopsJoin Date: 2012-09-27 Post Count: 5895 |
? |
|
PhyclopsJoin Date: 2012-09-27 Post Count: 5895 |
SAVE ME TRIOXIDE OR NOTUNKNOWN OR ANYONE PLEASR |
|
PhyclopsJoin Date: 2012-09-27 Post Count: 5895 |
? |
|
PhyclopsJoin Date: 2012-09-27 Post Count: 5895 |
? |
|
PhyclopsJoin Date: 2012-09-27 Post Count: 5895 |
? |
|
PhyclopsJoin Date: 2012-09-27 Post Count: 5895 |
? |
|
LandishJoin Date: 2011-09-24 Post Count: 8152 |
! |
|
PhyclopsJoin Date: 2012-09-27 Post Count: 5895 |
¿ |
|
LandishJoin Date: 2011-09-24 Post Count: 8152 |
¡ |
|
PhyclopsJoin Date: 2012-09-27 Post Count: 5895 |
i |
|
128GBJoin Date: 2014-04-17 Post Count: 8056 |
ghost:SetPrimaryPartCFrame(bin.Parent:FindFirstChild("Torso").CFrame - bin.Parent:FindFirstChild("Torso").Position)
Isn't that like saying
Gost:SetPrimaryPartCFrame(x - x) |
|
PhyclopsJoin Date: 2012-09-27 Post Count: 5895 |
VERIFIEDNAME IS ONLINE I BET HE CAN FIX THIS EASY
oh my god please save me like you have in the past |
|
PhyclopsJoin Date: 2012-09-27 Post Count: 5895 |
@128
idk. some guy did that part for me. pls don't leave this thread
HELP ME 128GB
YOU'RE GOOD AT THIS TOO |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
128, only if there is no rotation (by no rotation I mean 0 degrees on all axis)
Otherwise he's just setting the position to 0,0,0 with a rotation of whatever the torso has |
|
PhyclopsJoin Date: 2012-09-27 Post Count: 5895 |
YES
CNTKILLME HAS FOUND THIS THREAD
HE'S ONE OF THE COOL PEOPLE TOO
HELP ME PLEASE I'M DESPERATE I HAVE SPENT DAYS OF BUMPING THREADS |
|
PhyclopsJoin Date: 2012-09-27 Post Count: 5895 |
PLEASE |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
The rotation gets the Torso rotation to the nearest 90 degrees? As in if the torso is rotated 48 degrees (y-axis or w/e) the Ghost's PrimaryPart is rotated 90 degrees (y-axis or w/e)? |
|
PhyclopsJoin Date: 2012-09-27 Post Count: 5895 |
please come here and see for yourself.
http://www.roblox.com/Rust-In-Development-place?id=159665673
and type something in the chat when you're in
since playerlist is disabled for now. |
|
cntkillmeJoin Date: 2008-04-07 Post Count: 49450 |
I just need to update RobloxPlayer e_e
I'll meet you there. |
|