Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Help me with mouse.hit?

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

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

3 comments

0

This is something you should post as a comment -- not an answer.

0

The ragdolls end up glitching out of the world instead of being placed where they are meant to be.

0

sorry echo but I can't comment on the question for some reason...

This discussion is preserved as it was. New answers, comments, and votes are closed.