Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Help me with mouse.hit?

Asked by 8 years ago
local plr = game.Players.LocalPlayer
repeat wait() until plr.Character
local char = plr.Character
local mouse = plr:GetMouse()

local names = {"lelforumingalt","Fvii","Sevrick","Berezaa","iiODers","Dued1","Telamon","Shedletsky",
"Male Guest","Female Guest","Guest","Noob","Randcomo26","MisterObvious","Matt Dusek"}

mouse.KeyDown:connect(function(key)
if key == "e" then 
local newragdoll = game.ReplicatedStorage:FindFirstChild(names[math.random(1,#names)]):Clone()
newragdoll.Parent = game.Workspace

newragdoll.Torso.CFrame = mouse.Hit + mouse.Target.Position + Vector3.new(0,2,0)
end
end)

1 answer

Log in to vote
-1
Answered by
sigve10 94
8 years ago

Please explain the question... I have no idea what you want to know/fix.

0
This is something you should post as a comment -- not an answer. EchoReaper 290 — 8y
0
The ragdolls end up glitching out of the world instead of being placed where they are meant to be. GullibleChapV2 155 — 8y
0
sorry echo but I can't comment on the question for some reason... sigve10 94 — 8y
Ad

Answer this question