#Debugging a spring

1 messages · Page 1 of 1 (latest)

astral fog
#

I need help debugging this script so that it launches a player in the air upon collision.

player = game.Players.LocalPlayer
script.Parent.Touched:connect(function(hit)
    if hit.Parent == player.Character then
        player.Character.Torso.Velocity = Vector3.new(0, 100, 0)
    end
end)
mint river
#

LocalPlayer only works in local scripts

tribal scaffold
inner hatch
#

do on server: script.Parent.Touched:Connect(function(h) if game.Players:GetPlayerFromCharacter(h.Parent) then local force = 100 local time = 0.5 local vel = Instance.new("BodyVelocity",h.Parent.HumanoidRootPart) vel.MaxVelocity = Vector3.new(0,math.huge,0) vel.Velocity = Vector3.new(0,force,0) game.Debris:AddItem(vel,time) end end)

#

@astral fog

astral fog
#

Jumping after touching it makes me float without end as well

inner hatch
#

also i think its MaxVel

#

not max velocity

#

sorry

#

i forgot

#

do it on a SCRIPT

#

not a LOCALSCRIPT

astral fog
astral fog
inner hatch
languid zodiacBOT
#

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

inner hatch
#

hold up

astral fog
inner hatch
#

i think its just my bad

#

coding

#

i dont know if ur supposed to type Velocity.MaxVel

#

or velocity.MaxVelocity

#

try MaxVel

astral fog
#

Alr

astral fog
#

It doesn't seem to work

astral fog
#

And the script is fixed I think

inner hatch
#

oh

#

sorry i

#

forgot

#

try if it works now

astral fog
#

Nah, it's alright

astral fog
inner hatch
#

im currently playing lethal company so i wont respond