Hello, I was working with some tweens when I came across this problem. I am using the new cornerUI element and am tweening a textbutton after the mouse hovers over it. Here is the local script :
I get this error when hovering over it: “Unable to cast value to function”. I am thinking this is something to do with cornerUI since when I use the same code for previous guis not using cornerUi it works fine.
StarterGui is simply the place where GuiObjects are duplicated to a player’s PlayerGui, just as the case with StarterPlayerScripts, and a player’s PlayerScripts.
local Players = game:GetService("Players") -- gets the "Players" service
local LocalPlayer = Players.LocalPlayer -- get's the local-player's "Player" object
local PlayerGui = LocalPlayer.PlayerGui -- get's the local-player's PlayerGui
local DeathScreen = PlayerGui:WaitForChild("DeathSCreen") -- gets the "DeathSCreen"
local BackCharacter = DeathScreen:WaitForChild("BackCharacter") -- gets the "BackCharacter"
script.Parent.MouseEnter:Connect(function() -- same code as before (mostly)
BackCharacter:TweenPosition(UDim2.new(0.185, 0, 0.12, 0), Enum.EasingDirection.In, Enum.EasingStyle.Bounce, .5, false, true)
end)
there is now this error: 10:57:36.247 - Infinite yield possible on ‘Players.RobloxianLegend89.PlayerGui:WaitForChild(“HomeScreen”)’ and it still does not work.