Hi, I've been trying to make a mirror and this is what happens:
I just need help with the character-portian of it
My script:
local players = {}
game.Players.PlayerAdded:Connect(function(plr)
print("PLAYER ADDED")
if not players[plr.Name] then
repeat wait() until workspace:FindFirstChild(plr.Name)
local char=plr.Character:Clone()
char.Parent=workspace.MirrorPlayers
players[plr.Name]=char
end
end)
game:GetService("RunService").Heartbeat:Connect(function()
for i,v in pairs(game.Players:GetPlayers()) do
if players[v.Name] then
local cf = workspace.M1.CFrame:ToObjectSpace(v.Character.HumanoidRootPart.CFrame)*CFrame.Angles(0,math.pi,0)*CFrame.new(-1,-0.9,0)
local cf2 = workspace.M2.CFrame*cf
players[v.Name].HumanoidRootPart.CFrame = cf2
end
end
end)

3 comments
clone, get distance from mirror, add the inverse of the magnitude (basically -magnitude) to the mirror, then use a loop to properly position and set cframe according to base player
Ok i fixed a lot of the problems but now the character is backwards. Any ideas? Sorry, I never scripted a mirror before :/
and how do i replicate animations?