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
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?
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’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
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
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
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?