Beyblade Movement in Roblox

Trying to allow players to control their own beyblades.

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")

local player = Players.LocalPlayer

local launchRemote = ReplicatedStorage:WaitForChild("LaunchRemote")

local alreadyOwn = false
local isJumping = tick()

script.Parent.Activated:Connect(function()
	if not alreadyOwn then
		launchRemote:FireServer()
	else
		alreadyOwn:Disconnect()
		workspace.CurrentCamera.CameraSubject = player.Character.Humanoid
		workspace[player.Name.." Beyblade"]:Destroy()
		alreadyOwn = nil
		player.Character.PrimaryPart.Anchored = false
	end
end)

launchRemote.OnClientEvent:Connect(function(beyblade)
	
	alreadyOwn = RunService.Stepped:Connect(function()
		local finalVelocity = player.Character.Humanoid.MoveDirection*15
		
		if UserInputService:IsKeyDown(Enum.KeyCode.Space) then
			if (tick() - isJumping) >= 1 then
				finalVelocity += Vector3.new(0,250,0)
				isJumping = tick()
			end
		elseif (tick() - isJumping) <= 1 then
			finalVelocity -= Vector3.new(0,10,0)
		end
		
		workspace[beyblade].PrimaryPart.AssemblyLinearVelocity = finalVelocity
	end)
	
	workspace.CurrentCamera.CameraSubject = workspace[beyblade].PrimaryPart
	player.Character.PrimaryPart.Anchored = true
end)

This is what I have at the moment, it does work fine except for the jumping. Also need help on how to add the ‘slippery’ effect

1 Like

the slippery effect could be achieved by simply using custom physical properties, set all the properties to 0 except for density which should be about 0.01, higher = more slipperiness and lower opposite

also what part about the jumping doesn’t work, can you elaborate?

1 Like

Essentially, the jumping is more like teleporting higher up, rather than actually jumping up. I assume the fix is to gradually increase Velocity, like I am gradually decreasing it when making the Beyblade fall down, but maybe there’s a better way.

I think linear velocity instance does that for you

1 Like

Do the players have network ownership of their beyblades?

2 Likes

Yeah, they do. The problem isn’t that this script doesn’t work, just need to figure out how to do some features.

I’ll use that for movement and see if it helps. Another function I want is the beyblade tilting to the right/left/forward/backward depending on if ur holding W/A/S/D

Ok so, LinearVelocity simply keeps the Beyblade in the air, does not even drop at all.

Try use BasePart:ApplyImpulse(Vector3)

2 Likes

you have to enable and disable it

1 Like

this isn’t too hard and can be achieved by using the velocity instead of checking WASD, I’ll see if I can help with that when I get home

1 Like

the problem isn’t that the velocity doesn’t work, it’s being applied too fast/too much is applied at once. So this will probably not change that

3 Likes

The teleportation thing still happens though, even with the LinearVelocity

are you sure you need to add 250 to the velocity, if you have to because of the models weight try to turn on massless on some parts, keep in mind that turning on massless on all the parts will not make it have 0 gravity so you can do that

1 Like

the slippery effect could be achieved by simply using custom physical properties, set all the properties to 0 except for density which should be about 0.01, higher = more slipperiness and lower opposite

This didn’t work

image
My bad it’s supposed to be like this, lower number = more slipperyness
The effect will look like this

2 Likes

Still doesn’t do anything for some reason

are you sure you enabled it on every part in the model? if that’s not the problem then I don’t know

1 Like

Yeah, every part

how does the movement system work? Does it use a humanoid or is it a custom one? Does it instantly set velocity and loop that or does it just add velocity?

2 Likes