I wanna change "fp" cframe constantly
local UIS = game:GetService("UserInputService") local hotkey = Enum.KeyCode.Q local cooldown = 10 local event = game:GetService("ReplicatedStorage").Remotes.eventq local fp = game.Workspace.FIRE local plr = game:GetService("Players").LocalPlayer UIS.InputBegan:Connect(function(input) if input.KeyCode == hotkey then if tick() - plr.Cooldown.Value > cooldown then local fpl = plr.Character:WaitForChild("HumanoidRootPart").Position fp.CFrame = CFrame.new(fpl) fp.ParticleEmitter.Enabled = true event:FireServer(cooldown) wait(cooldown) fp.CFrame = CFrame.new(1721.725, 2511.404, -1099.142) fp.ParticleEmitter.Enabled = false end end end)
local UIS = game:GetService("UserInputService") local RS = game:GetService("RunService") local hotkey = Enum.KeyCode.Q local cooldown = 10 local event = game:GetService("ReplicatedStorage").Remotes.eventq local fp = game.Workspace.FIRE local plr = game:GetService("Players").LocalPlayer RunService.RenderStepped:Connect(function() if UIS:IsKeyDown(hotkey) then if tick() - plr.Cooldown.Value > cooldown then local fpl = plr.Character:WaitForChild("HumanoidRootPart").Position fp.CFrame = CFrame.new(fpl) fp.ParticleEmitter.Enabled = true event:FireServer(cooldown) wait(cooldown) fp.CFrame = CFrame.new(1721.725, 2511.404, -1099.142) fp.ParticleEmitter.Enabled = false end end end)
The concept of this script is to make an infinite loop, and check if Q is getting pressed each time. If Q is getting pressed, it will update the fp's position.
This code uses UIS:IsKeyDown(hotkey)
for simplicity's sake. I don't know about the false positives lol