Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Gore Dismemberment script wont blow back?

Im kinda refurbishing an old gore script and im making so if you get shot your body part gets sent flying, i had to learn linear velocity for this so it will definitely be bad

Btw the script is acheived using special character models with an attatchment in their left and right arms

edit : Also i dont get any errors in studio for some reason

local bullet = script.Parent
local attackerTag = bullet.Attacker.Value

bullet.Touched:Connect(function(hit)
	local char = hit.Parent
	local isHumanoid = char:FindFirstChild("Humanoid")
	
	local Force = Instance.new("LinearVelocity")
	Force.MaxForce = 1000
	Force.RelativeTo.Value = "Attatchment"

	hit.Parent = game.Workspace
	hit.CanCollide = true
	
	if hit.Name == "Left Arm" then
		char.Torso["Left Shoulder"]:Destroy()
	elseif hit.Name == "Right Arm" then
		char.Torso["Right Shoulder"]:Destroy()
	end
	
	
	
	

	
	
	if isHumanoid and char.Name ~= attackerTag then
		isHumanoid:TakeDamage(100)
	end
	
	Force.Parent = hit.BlowSite
	Force.Attachment0 = Force.Parent
	
	Force.VectorVelocity.Y = 1000
	Force.VectorVelocity.Z = 800
	wait(0.2)
	Force.VectorVelocity.Y = 0
	Force.VectorVelocity.Z = 0
	
	print("Blow-Back Successfull")
end)

1 answer

I don't know if this will fix the whole thing, but 1 problem I see is that you can't assign to RelativeTo.Value. That value is just the number value of the enum for ActuatorRelativeTo. Instead you can do RelativeTo = 0 or RelativeTo = Enum.ActuatorRelativeTo.Attachment0. Lmk if changing that fixes anything, if not I'll take a more detailed look at it.

2 comments

0

Honestly i'd say it worked a little too good, it instead flies out of the users hand.

0

lol, well I guess you can just tune it from there

This discussion is preserved as it was. New answers, comments, and votes are closed.