How to solve this problem?

so basically i have a script that will change the image of a image label, but for some reason it wont let me change it…
I dont get any Output error massages.
snippet
Heres the Image of the path.

local player = script.Parent.Parent.Parent.Parent
local value = player.PlayerValues.Weapon

value:GetPropertyChangedSignal("Value"):Connect(function()
	if value.Value == "ClassicSword" then
		print("HIUELELE")
		script.Parent.Image = 2513701731
	end
end)

And this is whats inside the local script.
-also in the script where it says print("HIUELELE") it will print

1 Like

An easier way, would be is to just reference the Player using game.Players.LocalPlayer

Anyways, I believe the Image property requires a Content ID, so you’ll need to reference it as rbxassetid:// instead

Try this:

local player = game.Players.LocalPlayer
local value = player:WaitForChild("PlayerValues").Weapon

value:GetPropertyChangedSignal("Value"):Connect(function()
	if value.Value == "ClassicSword" then
		print("HIUELELE")
		script.Parent.Image = "rbxassetid://2513701731"
	end
end)
1 Like

Thank you! Also i appreciate how your always willing to help others, lol weve seen eachother in the past few posts.

1 Like

I mean I tend to be pretty active around these parts :wink: It’s what the community as a whole does anyways

We’re here to learn, so don’t worry if you’re nervous on posting here!

1 Like
1 Like