One of the main problems is how the up hide ui button I have does not work with mobile devices as shown in the gif. There is no output, the buttons are scaled correctly, so there has to be something I’m missing. It works with other UIs and on desktop (as shown here (gyazo gif)).
Another issue I came across is that I can’t make the player load in rather than having a slow reset process. I have it so that when you click the r key, you reset to your previous checkpoint. This was also going to have a mousebutton1click function to it so it is compatible with mobile users. Though, I can’t get that far, because when I set it so that it loads the player, I get this:
It is a localscript in startercharscripts. If I put it as a regular script or anywhere else, it will error saying attempting to index nil with “humanoid” OR something similar.
I am wondering how I can make a compromise so that all of the following occur:
– The reset button works with mousebutton1click
– The reset button works with R
– You load in rather than die slowly (meaning LoadCharacter() instead of hum.health = 0)
Please provide suggestions and other solutions in the replies below.
ButtonInstance.MouseButton1Click:Connect(function()
game.ReplicatedStorage.ResetCharacter:FireServer()
end)
game:GetService("UserInputService").InputBegan:Connect(function(Input, GameProccessed)
if Input.KeyCode == Enum.KeyCode.R and GameProccessed == false then
game.ReplicatedStorage.ResetCharacter:FireServer()
end
end)
You can set the transparency of the button to 0.5 and test if it doesnt move from their original position, also, check if there isn’t another UI object blocking it
Check if the ZIndex of the image is less than the ZIndex of the button, it’s a property of all UI objects. If it isn’t, the image is probably preventing the button from get clicked