Skip to content

Caption error when calling Utility.clipOutside() #203

@Dannyftm

Description

@Dannyftm

When trying to destroy an icon and then creating a new one and calling :setCaption() on it I get the below error.

ReplicatedStorage.Modules.Icon.Utility:185: attempt to index nil with 'FindFirstAncestorWhichIsA'
Stack Begin
Script 'ReplicatedStorage.Modules.Icon.Utility', Line 185 - function updateScreenGui
Script 'ReplicatedStorage.Modules.Icon.Utility', Line 191 - function clipOutside
Script 'ReplicatedStorage.Modules.Icon', Line 1088 - function clipOutside
Script 'ReplicatedStorage.Modules.Icon.Elements.Caption', Line 153
Script 'ReplicatedStorage.Modules.Icon', Line 1011 - function setCaption
Script 'Players.MrLonely1221.PlayerScripts.TopBar', Line 69 - function _generatePrivateServerIcon
Script 'Players.MrLonely1221.PlayerScripts.TopBar', Line 100
Stack End

looking at the call in Elements.Caption to Utility.clipOutisde(), it's only passing caption as the first argument and not passing a second argument. When I changed the code to pass a second argument (tried caption as well as box) it still returns the same error.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions