Posted
I'm looking for a script that will make the place I hover my mouse over and press CTRL explode. Thanks
This script doesn't work;
local plr = game:GetService"Players".LocalPlayer
local m = plr"GetMouse"
local ctrldown = false
game:GetService"UserInputService".InputBegan:connect(function(iobj, gp)
if iobj.KeyCode == Enum.KeyCode.LeftControl then
ctrldown = true
end
end)
game:GetService"UserInputService".InputEnded:connect(function(iobj, gp)
if iobj.KeyCode == Enum.KeyCode.LeftControl then
ctrldown = false
end
end)
m.Button1Down:connect(function()
if ctrldown and m.Target then
Instance.new("Explosion", workspace).Position = m.Hit.p
end
end)
Replied
try this, but others can't see it so idk why you'd want it
local plr = game:GetService"Players".LocalPlayer
local m = plr:GetMouse()
local ctrldown = false
game:GetService"UserInputService".InputBegan:connect(function(iobj, gp)
if iobj.KeyCode == Enum.KeyCode.LeftControl then
ctrldown = true
end
end)
game:GetService"UserInputService".InputEnded:connect(function(iobj, gp)
if iobj.KeyCode == Enum.KeyCode.LeftControl then
ctrldown = false
end
end)
m.Button1Down:connect(function()
if ctrldown and m.Target then
Instance.new("Explosion", workspace).Position = m.Hit.p
end
end)Cancel
Post
Replied
Yeah. but you are the only one who can see it
Cancel
Post
I'm not lazy, I'm just highly motivated to do nothing. #I💚Dogs.
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post