Im tryng to make a 2d pixel game and I have a MAIN problem, I cant find a way to change the image and values of image inside a billboard gui inside a character, I tried the script being the child of the parent and the script in serverscriptservice, none of them worked, I used events to change the image
ServerScriptService scipt (will be changing values and image)
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
local image = character:WaitForChild("Head"):WaitForChild("BillboardGui"):WaitForChild("ImageLabel")
local events = game:GetService("ReplicatedStorage").Animations
events.FLeft.OnServerEvent:Connect(function()
image.ImageRectSize = "-1008, 1008"
image.ImageRectOffset = "1008,0"
end)
events.FRight.OnServerEvent:Connect(function()
image.ImageRectSize = "1008, 1008"
image.ImageRectOffset = "0,0"
end)
end)
end)
LocalScript inside character (Used to fire the events for the server script
This text will be hidden
this is currently the serverscript way, also the FLeft and FRight is where the image is facing whether left or right, I used the image rect thing to mirror it with the UserInputService to know what side its supposed to be facing, also no errors in the output (edit: im just working on the facing of the character so theres no changing of image in the character)