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: Trouble with my Script Builder script..

Previous Thread :: Next Thread 
GuestCapone is not online. GuestCapone
Joined: 19 Oct 2012
Total Posts: 1928
16 May 2013 04:29 AM
This works extremely well in studio, however in SB... It stops at "undead["Left Arm"]:remove()" past that, I don't know if anything happens.

wait()-- Do not execute quite yet, so that the body parts have time to make joints
-----
game.Lighting.FogEnd = 60
game.Lighting.FogColor = Color3.new(0,0,0)
game.Lighting.TimeOfDay="00:00:00"
players = game.Players:GetChildren()
for i,v in pairs(players) do
v.CameraMode="LockFirstPerson"
end
----
game.Players.Player1.CameraMode="Classic"
----
undead = game.Workspace.Player1
----
humanoid = undead.Humanoid
humanoid.WalkSpeed = 14
humanoid.MaxHealth = 125

torso = undead.Torso
c = Instance.new("ObjectValue")
c.Name = "creator"
c.Parent = undead
undead["Head"].Transparency = 1
undead["Torso"].Transparency = 1
undead["Right Leg"].Transparency = 1
undead["Left Leg"].Transparency = 1
undead["Right Arm"]:remove()
undead["Left Arm"]:remove()
run_debounce = false
bf = Instance.new("BodyForce")
bf.force = Vector3.new(0,-2000,0)
bf.Parent = torso
tum = Instance.new("Part")
tum.Name = "Stomach"
tum.formFactor = 0
tum.BrickColor = BrickColor.new("Really black")
tum.Size = Vector3.new(2,3,1)
tum.Parent = undead
local weld = Instance.new("Weld")
weld.Part0 = torso
weld.Part1 = tum
weld.C1 = weld.C1 * CFrame.new(0, -1.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, 0)
weld.Parent = tum

left_arm = Instance.new("Part")
la = left_arm
la.CanCollide = false
la.formFactor = 0
la.BrickColor = BrickColor.new("Really black")
la.Size = Vector3.new(1,4,1)
la.Parent = undead
local weld = Instance.new("Motor")
weld.Part0 = la
weld.Part1 = torso
weld.C1 = weld.C1 * CFrame.new(-1.5, 1, 0) * CFrame.fromEulerAnglesXYZ(0, -1.5, 0)
weld.Parent = la
weld.MaxVelocity = 0.1

right_arm = Instance.new("Part")
ra = right_arm
ra.CanCollide = false
ra.formFactor = 0
ra.BrickColor = BrickColor.new("Really black")
ra.Size = Vector3.new(1,4,1)
ra.Parent = undead
local weld = Instance.new("Motor")
weld.Part0 = ra
weld.Part1 = torso
weld.C1 = weld.C1 * CFrame.new(1.5, 1, 0) * CFrame.fromEulerAnglesXYZ(0, 1.5, 0)
weld.Parent = ra
weld.MaxVelocity = 0.1

left_leg = Instance.new("Part")
ll= left_leg
ll.BrickColor = BrickColor.new("Really black")
ll.CanCollide = false
ll.formFactor = 0
ll.Size = Vector3.new(1,3,1)
ll.Parent = undead
local weld = Instance.new("Motor")
weld.Part0 = ll
weld.Part1 = torso
weld.C1 = weld.C1 * CFrame.new(-0.5, -1.5, 0) * CFrame.fromEulerAnglesXYZ(0, 1.5, 0)
weld.Parent = ll
weld.MaxVelocity = 0.08

right_leg = Instance.new("Part")
rl= right_leg
rl.CanCollide = false
rl.BrickColor = BrickColor.new("Really black")
rl.formFactor = 0
rl.Size = Vector3.new(1,3,1)
rl.Parent = undead
local weld = Instance.new("Motor")
weld.Part0 = rl
weld.Part1 = torso
weld.C1 = weld.C1 * CFrame.new(0.5, -1.5, 0) * CFrame.fromEulerAnglesXYZ(0, 1.5, 0)
weld.Parent = rl
weld.MaxVelocity = 0.08

fc = Instance.new("Part")
fc.formFactor = 0
fc.Size = Vector3.new(2,1,1)
fc.Name = "Face"
undead.Head.Mesh:Clone().Parent = fc
fc.Parent = undead

local weld = Instance.new("Weld")
weld.Part0 = tum
weld.Part1 = fc
weld.C1 = weld.C1 * CFrame.new(0, -2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
weld.Parent = fc
spd = 0
dead = false
fallen = false

function onTouch(hit)
if hit.Name == "Torso" then

local humanoid = hit.Parent.Humanoid
if(hit.Parent:FindFirstChild("creator")==nil)then
tagHumanoid(humanoid, undead.creator)
humanoid:TakeDamage(999)

wait(2)

untagHumanoid(humanoid)
end
end
end
left_arm.Touched:connect(onTouch)
right_arm.Touched:connect(onTouch)
undead.Head.Touched:connect(onTouch);
function tagHumanoid(humanoid, creator)
if creator ~= nil then
local new_tag = creator:clone()
new_tag.Parent = humanoid

end
end

function untagHumanoid(humanoid)
if humanoid ~= nil then
local tag = humanoid:findFirstChild("creator")
if tag ~= nil then

tag.Parent = nil
end
end
end

function dead()
dead = true
wait(3)
local trans = 0
while(trans<1)do
local parts = undead:GetChildren()
for i = 1, #parts do
if(parts[i].className=="Part")and
(parts[i].Name~="Head")then
parts[i].CanCollide = true
parts[i].Transparency = trans
end
end
wait(.1)
trans = trans +0.1
end
end
humanoid.Died:connect(dead)

function pose(la, ra, ll, rl)
if(left_arm~=nil)and(left_arm.Parent~=nil)then
left_arm.Motor.DesiredAngle = la
end

if(right_arm~=nil)and(right_arm.Parent~=nil)then
right_arm.Motor.DesiredAngle = ra
end

if(left_leg~=nil)and(left_leg.Parent~=nil)then
left_leg.Motor.DesiredAngle = ll
end

if(right_leg~=nil)and(right_leg.Parent~=nil)then
right_leg.Motor.DesiredAngle = rl
end
end

function run(run_spd)
spd = run_spd
if(spd>0.5)and(run_debounce==false)then
run_debounce = true
while(spd>0.5)do
pose(0.5,0.5,-0.3,0.3)
wait(0.4)
if(spd<=0.5)then break end
pose(-0.5,-0.5,0.3,-0.3)
wait(0.4)
end
pose(0, 0, 0, 0)
run_debounce = false
end
end
humanoid.Running:connect(run)

wait(.5)
humanoid.Health = humanoid.MaxHealth
Report Abuse
me6666me is not online. me6666me
Joined: 30 Aug 2011
Total Posts: 698
16 May 2013 04:36 AM
Try running it in studio mode and check the output or set it as a local script, not a regular one.
Report Abuse
GuestCapone is not online. GuestCapone
Joined: 19 Oct 2012
Total Posts: 1928
16 May 2013 02:07 PM
alright.
Report Abuse
btft is not online. btft
Joined: 19 Feb 2011
Total Posts: 1512
16 May 2013 02:12 PM
um all of the names are set to 'Player1'. I assume you shall change them to 'GuestCapone'..?
Report Abuse
NOWAYOUT2 is not online. NOWAYOUT2
Joined: 24 Jul 2011
Total Posts: 5556
16 May 2013 03:02 PM
^

[~Achievement Unlocked~]
Report Abuse
GuestCapone is not online. GuestCapone
Joined: 19 Oct 2012
Total Posts: 1928
16 May 2013 07:24 PM
No I found my problem around 8am this morning.
But I can't tell you what it is right now, cause I don't remember it.. lol, but it works now.
And no it wasn't the player1 to guestcapone problem, the script stopped after removing your left arm.

Mark thread as solved.
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