code a roblox lua script for a odm gear with linearvelocity and mouse position with this…
- User
code a roblox lua script for a odm gear with linearvelocity and mouse position with this logic: when the mouse is at a object and the user hold e or q it will launch the hook and anchor it on the part and move the player to the hook until the user stop holding: -- Variables local player = game.Players.LocalPlayer local mouse = player:GetMouse() local userInputService = game:GetService("UserInputService")
local odmGear = script.Parent -- Assuming the script is placed inside the ODM gear part local hookPart = odmGear.HookPart -- Assuming the "hook" part is a child of the ODM gear part local hookLaunched = false local hookAnchored = false
Assistant
Here is a Lua script that should achieve the logic you described:
lua
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.