#Debugging a spring
1 messages · Page 1 of 1 (latest)
LocalPlayer only works in local scripts
Like Perforate said LocalPlayer only works in local scripts.
Instead of checking if hit belongs to the local Player you can just check if hit.Parent.Humanoid exists.
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
Jumping after touching it makes me float without end as well
i said on server
also i think its MaxVel
not max velocity
sorry
i forgot
do it on a SCRIPT
not a LOCALSCRIPT
On server what?
It is
You are doing it on a local script, which is only for the client
** You are now Level 2! **
hold up
I'm using a regular script, trust me
i think its just my bad
coding
i dont know if ur supposed to type Velocity.MaxVel
or velocity.MaxVelocity
try MaxVel
Alr
I checked the documentation, the correct name was "maxforce"
And the script is fixed I think
Nah, it's alright
It does what it's supposed to do now, thank you so much for your assistance.
im currently playing lethal company so i wont respond