So, im trying to create a 2d avatar game (Like club penguin) Ive made a custom character with a billboard gui and I’m wondering how I would make it flip the direction the player is facing. Anyone know how I would do that? https://gyazo.com/f3cfe5931d5513e463f45b5b68cc675d
1 Like
Hmmm, may I check your Protect? Just attach the file of your Roblox Project and I’ll try to help you.
so do you want to know how to flip this image when Humanoid goes on an another side?
1 Like
Mhm, Yeah I do.
There isn’t any legal way to flip
image in Roblox’s engine, but you can flip this frame in any Image editor… Like Photoshop. Make your script like this
local Camera = game.Workspace.Camera
local Player = game.Players.LocalPlayer
repeat
wait()
until Player.Character
local Player = Player.Character
local HumanoidRootPart = Player.HumanoidRootPart
local Humanoid = Player.Humanoid
local Positioner = Instance.new("BodyPosition", HumanoidRootPart)
Positioner.MaxForce = Vector3.new(0, 0, math.huge)
Positioner.Position = Vector3.new(0, 0,HumanoidRootPart.Position.Z)
Camera.CameraType = Enum.CameraType.Scriptable
Camera.CameraSubject = Player.HumanoidRootPart
game:GetService("RunService").RenderStepped:connect(function()
Camera.CFrame = CFrame.new(HumanoidRootPart.CFrame.X, HumanoidRootPart.CFrame.Y + 3, HumanoidRootPart.CFrame.Z + 30)
Camera.FieldOfView = 30
if Humanoid.MoveDirection.X == -1 then
Player.Head.Player.ImageLabel.Image = "" -- Your Dude flipped left.
end
if Humanoid.MoveDirection.X == 1 then
Player.Head.Player.ImageLabel.Image = "rbxassetid://6078570616"
end
end)
1 Like