Im unsure if its a gravity situation, But in the testing zone for a game I have, the script works fine and you can hit them upwards, however when I import it to the main game, it doesn’t bring the player up at all.
https://i.gyazo.com/fec51c711081753e9bf423fb5867ac73.mp4 - What it should be doing
https://i.gyazo.com/dbf5ed9652450d51617d9ae85e27afb9.mp4 - What it is doing
If you need to see the code I can show it, but i think its just something to do with the game itself
(I use bodyposition to bring them upwards btw)
I would recommend using AlignPosition instead, it uses the new constraints system (and it’s not deprecated)
Also for scripting support you need to show your code or there’s not much people can do
The entire M1 script is alot, so ill just include the part where it brings you upwards
Character.Humanoid.JumpPower = 0
local FightAnimation = Character.Humanoid:LoadAnimation(script.HitUp)
FightAnimation:Play()
Sound("rbxassetid://5835032207",0.3,math.random(1.5,1.8),false,0,1,Character.HumanoidRootPart)
local HitBox = Instance.new("Part",workspace)
HitBox.Anchored = false
HitBox.CanCollide = false
HitBox.CanTouch = true
HitBox.Size = Vector3.new(5,5,HandM1Range)
HitBox.Massless = true
HitBox.Transparency = 1
HitBox.Material = "ForceField"
HitBox.CFrame = Character.HumanoidRootPart.CFrame * CFrame.new(0,0,4)
local HitBoxWeld = Instance.new("Weld",HitBox)
HitBoxWeld.Part0 = HitBox
HitBoxWeld.Part1 = Character.HumanoidRootPart
HitBoxWeld.C0 = HitBoxWeld.Part0.CFrame:ToObjectSpace(HitBoxWeld.Part1.CFrame * CFrame.new(0,0,4))
game.Debris:AddItem(HitBox,0.2)
game.Debris:AddItem(HitBoxWeld,0.2)
HitBox.Touched:Connect(function(a)
if a:IsA("BasePart") and a.Name == "HumanoidRootPart" then
if a.Parent:IsA("Model") and a.Parent.Name ~= Character.Name then
local EPlayer = game:GetService("Players"):GetPlayerFromCharacter(a.Parent)
if a.Parent:FindFirstChild("Humanoid") and a.Parent:FindFirstChild("Humanoid").Health > 0 and a.Parent ~= Character and not a.Parent:FindFirstChild("M1Hit") then
local Team = Character:WaitForChild("TeamVal")
local ETeam = a.Parent:WaitForChild("TeamVal")
if Team.Value ~= ETeam.Value then
if a.Parent:FindFirstChild("IFrame") then
return
end
if a.Parent:FindFirstChild("Counter") then
CounterEvent:Fire(Character,a.Parent)
print("FIRED COUNTER")
return
end
if a.Parent:FindFirstChild("Dodging") then
DodgeEvent:Fire(Character,a.Parent)
return
end
if a.Parent:FindFirstChild("Blocking") and a.Parent:FindFirstChild("Blocking").Value == true then
BlockingEvent:Fire(a.Parent,count,Character)
print("BLOCKED")
else
a.Parent:FindFirstChild("Humanoid"):TakeDamage(4)
if UltPercent then
UltPercent.Value = math.clamp(UltPercent.Value + 2,0,100)
end
local CT = Instance.new("ObjectValue", a.Parent:FindFirstChild("Humanoid"))
CT.Name = "Creator"
CT.Value = Player
game.Debris:AddItem(CT,2)
Sound("rbxassetid://3932506183",1,1,false,0,1,a.Parent:FindFirstChild("HumanoidRootPart"))
local M1Paticles = script:FindFirstChild("PartiEffects"):Clone()
M1Paticles.Parent = a.Parent.HumanoidRootPart
M1Paticles.HitWave1.Parent = a.Parent.HumanoidRootPart
M1Paticles.HitWave2.Parent = a.Parent.HumanoidRootPart
M1Paticles.HitWave3.Parent = a.Parent.HumanoidRootPart
M1Paticles.Stars.Parent = a.Parent.HumanoidRootPart
a.Parent.HumanoidRootPart.HitWave1:Emit(5)
a.Parent.HumanoidRootPart.HitWave2:Emit(5)
a.Parent.HumanoidRootPart.HitWave3:Emit(5)
a.Parent.HumanoidRootPart.Stars:Emit(5)
game.Debris:AddItem(M1Paticles,1)
local FolderHit = Instance.new("Folder",a.Parent)
FolderHit.Name = "M1Hit"
game.Debris:AddItem(FolderHit,0.2)
local VeloCity = Instance.new("BodyPosition",a.Parent:FindFirstChild("HumanoidRootPart"))
VeloCity.MaxForce = Vector3.new(0,60000,0)
VeloCity.Position = Character:FindFirstChild("HumanoidRootPart").CFrame.UpVector * 30
game.Debris:AddItem(VeloCity,1.5)
local CVeloCity = Instance.new("BodyPosition",Character:FindFirstChild("HumanoidRootPart"))
CVeloCity.MaxForce = Vector3.new(0,60000,0)
CVeloCity.Position = Character:FindFirstChild("HumanoidRootPart").CFrame.UpVector * 30
game.Debris:AddItem(CVeloCity,1.5)
local EStun = Instance.new("BoolValue")
EStun.Name = "eStun"
EStun.Parent = a.Parent
game.Debris:AddItem(EStun,2)
end
end
end
end
end
end)
Key = 4
wait(0.4)
Character.Humanoid.JumpPower = 50
You don’t take the existing position, so it’s probably trying to shove you into the ground
But why does it work in the other game, but not work in the main game?
Not sure.
Again, I would recommend using AlignPosition, since BodyPosition is deprecated (and could get removed in the future)
Im not familiar with Align Position, could you give me an example of how it would work with bringing them upwards?
To make AlignPositions, you will need a part with an Attachment in it.
The part with the Attachment will be the part that is moved.
Then just set the Position property and you’re done!
Do note that .MaxForce is a number value instead of a Vector3 in AlignPositions, but with the fix I had mentioned earlier this shouldn’t be too big of a problem.
I just don’t think im able to use Align Position with this, I still want to figure out why its acting different in one game rather than the other
https://i.gyazo.com/8c7f1d3ba32ee83052e166ca7930d704.mp4
I’ve now tested it without a roof (this is the same script) and it sends me much higher which is probably why it looks like im bouncing on the floor
It should barely go up, like it does in the testing game but doesn’t in the main one