Carrying on from this topic:
Someone told me to fetch the position of the jump button and place my mobile button above it. It would be easy and all if my button was a gui but instead it’s made by CAS. So I don’t know if their properties is the same as a gui or not
Now, I’ve attempted to do what the script says but a few changes, but now instead of showing the button on top of the jump button, the button disappears from the device’s screen completely.
I have no idea how this happened, I’m I just clueless or is there any potential problems that is making this happen? Thank you for reading.
Here’s my local script (from StarterCharacterScript) so far:
local player = game:GetService("Players").LocalPlayer
local PlayerGui = player:WaitForChild("PlayerGui")
local TouchGui = PlayerGui:WaitForChild("TouchGui")
local TouchControlFrame = TouchGui:WaitForChild("TouchControlFrame")
local JumpButton = TouchControlFrame:WaitForChild("JumpButton")
local absSizeX, absSizeY = JumpButton.AbsoluteSize.X, JumpButton.AbsoluteSize.Y
local absPositionX, absPositionY = JumpButton.AbsolutePosition.X, JumpButton.AbsolutePosition.Y
-- code blah blah blah
if dashMobileButton then
dashMobileButton.Image = mobileButtonImage
dashMobileButton.ImageColor3 = normalImageColor
--dashMobileButton.Position = mobileButtonPosition
--dashMobileButton.Size = UDim2.new(0.2, 0, 0.2, 0)
dashMobileButton.AnchorPoint = Vector2.new(0.5, 1)
dashMobileButton.Size = UDim2.new(0, absSizeX * 0.8, 0, absSizeY * 0.8)
dashMobileButton.Position = UDim2.new(0, absPositionX + (absSizeX / 2), 0, absPositionY - 20)
end