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: working in test but not play

Previous Thread :: Next Thread 
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
15 Jun 2014 11:52 AM
why wouldnt this work in play but work in test?

weldpart = script.Parent.Parent.Parent.Turret.TurretRing

w = Instance.new("Weld")
w.Parent = script.Parent
w.Part0 = script.Parent
w.Part1 = weldpart
w.C0 = w.Part0.CFrame:inverse()
w.C1 = w.Part1.CFrame:inverse()
Report Abuse
air3000 is not online. air3000
Joined: 09 Oct 2010
Total Posts: 57
15 Jun 2014 11:57 AM
try setting the parent last thing

weldpart = script.Parent.Parent.Parent.Turret.TurretRing

w = Instance.new("Weld")
w.Part0 = script.Parent
w.Part1 = weldpart
w.C0 = w.Part0.CFrame:inverse()
w.C1 = w.Part1.CFrame:inverse()
w.Parent = script.Parent
Report Abuse
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
15 Jun 2014 12:02 PM
number one, i grabbed the wrong script but its almost the same anyways:

weldpart = script.Parent.Parent.TurretRing

w = Instance.new("Weld")

w.Part0 = script.Parent
w.Part1 = weldpart
w.C0 = w.Part0.CFrame:inverse()
w.C1 = w.Part1.CFrame:inverse()
w.Parent = script.Parent

number two, it doesnt work.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
15 Jun 2014 12:03 PM
Is it a Script or LocalScript?
Report Abuse
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
15 Jun 2014 12:04 PM
regular script.
Report Abuse
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
15 Jun 2014 12:15 PM
bump
Report Abuse
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
15 Jun 2014 12:34 PM
bumpp
Report Abuse
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
15 Jun 2014 01:13 PM
bumppp
Report Abuse
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
15 Jun 2014 01:42 PM
OMG SOMEONE HELP
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
15 Jun 2014 03:52 PM
w = Instance.new("Weld", script.Parent)

w.Part0 = script.Parent
w.Part1 = script.Parent.Parent.TurretRing
w.C0 = w.Part0.CFrame:inverse()
w.C1 = w.Part1.CFrame:inverse()



Try that. I see your desperate...
Report Abuse
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
16 Jun 2014 05:25 AM
doesnt work. I think it might be this script instead since that does weld. But this is not mine and it isnt un-anchoring the parts after the weld.

function weld()
local parts,last = {}
local function scan(parent)
for _,v in pairs(parent:GetChildren()) do
if (v:IsA("BasePart")) then
if (last) then
local w = Instance.new("Weld")
w.Name = ("%s_Weld"):format(v.Name)
w.Part0,w.Part1 = last,v
w.C0 = last.CFrame:inverse()
w.C1 = v.CFrame:inverse()
w.Parent = last
end
last = v
table.insert(parts,v)
end
scan(v)
end
end
scan(script.Parent)
for _,v in pairs(parts) do
v.Anchored = false
wait(1)
v.Anchored = false
end
end

weld()
script:Remove()

i even added that second v.Anchored = false and the wait but it still doesnt work.
Report Abuse
KingJacko is not online. KingJacko
Joined: 20 Jun 2008
Total Posts: 3944
16 Jun 2014 02:25 PM
bump
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