#does anyone know why the player isnt being flung man

1 messages · Page 1 of 1 (latest)

waxen remnant
#

lava.Touched:Connect(function(touched)
    local victim = touched.Parent and touched.Parent:FindFirstChild("Humanoid")
    local sound = Instance.new("Sound")
    sound.SoundId = "rbxassetid://12222058"
    sound.Volume = 1
    sound.RollOffMaxDistance = 100
    sound.Parent = workspace
    sound:Play()
    game.Debris:AddItem(sound, 3) 
    if victim then
        root = victim.Parent:FindFirstChild("HumanoidRootPart")
        if root then
            print("hi im root")
            root:ApplyImpulse(Vector3.new(0, 5000, 0))
        end
    end
    if touched:IsA("BasePart") then    
        touched.BrickColor = BrickColor.new("Black")
        touched.AssemblyLinearVelocity = Vector3.new(2342340,1022340,2342342340)
        fire = Instance.new("Fire")
        fire.Parent = touched
        wait(3)
        touched:Destroy()
    end
end)  ```
#

everything else is working and "hi im root" get sprinted

wind topaz
#

Try setting the root's assemblylinearvelocity instead of apply impulse

exotic thunderBOT
#

studio** You are now Level 1! **studio

waxen remnant
#

i did that

#

i am very cobnfuse.d..

wind topaz
#

what happens?

waxen remnant
#

nothing

#

no fling

wind topaz
#

like this? :root.AssemblyLinearVelocity = Vector3.new(0, 1000, 0)

waxen remnant
#

yeah like that

exotic thunderBOT
#

studio** You are now Level 1! **studio

waxen remnant
#

also when itried to uhhhhhhhh

#

enter assemvlylinearvelocity

#

it didnt have tab complete for it

#

maybe unrelated but yeah

wind topaz
#

Yeah thats normal

#

but heres what i did

#
 lava = script.Parent


lava.Touched:Connect(function(touched)
    
    local victim = touched.Parent and touched.Parent:FindFirstChild("Humanoid")
    local sound = Instance.new("Sound")
    sound.SoundId = "rbxassetid://12222058"
    sound.Volume = 1
    sound.RollOffMaxDistance = 100
    sound.Parent = workspace
    sound:Play()
    game.Debris:AddItem(sound, 3) 
    if victim then
        root = victim.Parent:FindFirstChild("HumanoidRootPart")
        if root then
            print("hi im root")
            --root:ApplyImpulse(Vector3.new(0, 5000, 0))
            root.AssemblyLinearVelocity = Vector3.new(0, 1000, 0)
        end
    end
    --if touched:IsA("BasePart") and touched.Name ~= "Baseplate" then    
    --    touched.BrickColor = BrickColor.new("Black")
    --    touched.AssemblyLinearVelocity = Vector3.new(2342340,1022340,2342342340)
    --    fire = Instance.new("Fire")
    --    fire.Parent = touched
    --    wait(3)
    --    touched:Destroy()
    --end
end)  
waxen remnant
#

let me try

wind topaz
#

i commented out the basepart bit

waxen remnant
#

but like

#

Down

#

and it flung me super far up

#

after a sec

wind topaz
#

is the basepart for like non players or?

waxen remnant
#

yeah

#

it also makes the players limbs go black and uhh

#

fire too

wind topaz
#

well its cause like left leg and right leg are baseparts so itll trigger that

waxen remnant
#

yeah

wind topaz
#

and also apply the insane vector3 onto the whole body

#

so you can have seperate like events for player and non player?

waxen remnant
#

the vector3 turned insane for testing by the way

waxen remnant
wind topaz
#

I mean its not seperate both will happen if its human

#

So cant you use elseif so that if its not human smth touches itll do the fire

#

if victim then
root = victim.Parent:FindFirstChild("HumanoidRootPart")
if root then
print("hi im root")
--root:ApplyImpulse(Vector3.new(0, 5000, 0))
root.AssemblyLinearVelocity = Vector3.new(0, 1000, 0)
end
elseif touched:IsA("BasePart") and touched.Name ~= "Baseplate" then

    touched.BrickColor = BrickColor.new("Black")
    touched.AssemblyLinearVelocity = Vector3.new(10, 10, 10)
    fire = Instance.new("Fire")
    fire.Parent = touched
    wait(3)
    touched:Destroy()

end
#

like that, so humans will get flung and non humans will turn to fire then get destroyed, if thats what you want?

waxen remnant
#

and fling both

grand lily
#

yo

#

yall are smartt

waxen remnant
grand lily
#

to make that code by urself

#

very intellegent

#

ngl

wind topaz
#

like that? if you havent done yet sry fr late reply

waxen remnant
#

i can try that

#

idk though it seems to be moving me

#

but down

#

and like

#

it flung me up once

wind topaz
#

hmm

exotic thunderBOT
#

studio** You are now Level 2! **studio

wind topaz
#

with that script?

#

typo on parent on that btw

grand lily
wind topaz
#

uhhh for what?