i want my game to be fixed, my script is kinda broken and i dont know what to do next.

I want to achieve when player’s mouse move up and down, the sauce move up and down and have a limit of 1 stud so the sauce wont flys out. According to the speed of the player mouse, the more speed it have, the more sauce it drops out.

myGame:

Spice v0.1.rbxl (97.2 KB)

Can you provide code rather than a game download link and a more thorough explanation of what you’ve done? Currently you’ve just told us what you want to achieve without any other help.

```
sauceServer.OnServerEvent:Connect(function(player, delta)
local drop = 0
if delta.Y > 0 or delta.X > 0 or delta.Y < 0 or delta.X < 0 then
if (delta.X < 10 and delta.X > 0) or (delta.X > -10 and delta.X < 0)
or (delta.Y < 10 and delta.Y > 0) or (delta.Y > -10 and delta.Y < 0)
then
drop = 1
else
drop = 0
end
if (delta.X >= 10 and delta.X < 25) or (delta.X <= -10 and delta.X > -25)
or (delta.Y >= 10 and delta.Y < 25) or (delta.Y <= -10 and delta.Y > -25)
then
drop = 2
else
drop = 0
end
if delta.X >= 25 or delta.X <= -25 or delta.Y >= 25 or delta.Y <= 25 then
drop = 3
else
drop = 0
end
end
print(delta)
print(drop)
if drop > 0 then
for i=1, drop, 1 do
local newDrop = Instance.new("Part")
newDrop.Name = "Drop"
newDrop.Parent = workspace
end
end
end)
```

```
local function OnRenderStep()
local delta = UserInputService:GetMouseDelta()
sauceServer:FireServer(delta)
end
UserInputService.InputBegan:Connect(registerKeyPressed);
UserInputService.InputEnded:Connect(unregisterKeyPressed)
RunService.Heartbeat:Connect(managePartMovement)
while wait(1) do
OnRenderStep()
end
```

the drop always get 3