So what the problem for me is when the Lookvector of my part is too fast, I can’t control the way to go, and when I jump, my speed just becomes back to 16, what I want it to do is when you jump you have the same velocity as when your on the part. I want to make it seem like you’re sliding. Here is my script, it is pretty simple
while true do
script.Parent.Velocity = script.Parent.CFrame.lookVector *100 --lookVector Velocity
wait(0.1)
end
I tried to do this but it didn’t work
function Control(hit)
if hit.Name == “IceBlock1” then
hit.Parent.Velocity = Vector3.new(0,0,100)
else
hit.Parent.Velocity = Vector3.new(0,0,0)
end
end
script.Parent.Touched:connect(Control)
There are many problems with your script. “hit” is the player, not the block. You also have to put “local” in front of the function. Your script should look like this:
local block = workspace.IceBlock1 --Variable for the block, make changes so that it ends in your blocks' name
block.Touched:Connect(function(hit) -- Activates function
if hit.Parent:FindFIrstChild("Humanoid") then -- Checks if the hit is a player
block.Velocity = Vector3.new(0,0,100)
else
block.Velocity = Vector3.new(0,0,0)
end
end)
Replace any information about the block and velocity with your desire. Reply with any questions or any errors that occur.
1 Like
I don’t think you understand me, the script is working but I can’t move left or right quickly… you basically did what the script i put up there