I don’t believe you need a remoteevent since you’re only gonna need to change the code for one player, not everyone’s gui. One thing it could be is that you’re maybe using DecalId. Try finding an image you want to use, place it inside of an ImageLabel, wait a bit for it to load, copy what’s in the Image property now and replace that in the rbxassetid://6319951708 line
On the local script you would do
game.ReplicatedStorage.RemoteEvent:FireServer()
Then on the server you can do
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player)
player.PlayerGui.(wherever your image label is).Image = "rbxassetid://000000"
end)
I personally dont think this is the issue but you can do this if you want
wait no it works but it changes the one in starter gui and not the player’s
Where is the script located? Aka, how far into StarterGui is it
its parented to startergui, the “LocalScript”
local gui = script.Parent
local inv = gui.InventoryGui.Templates.Item
--local ImageLabel = inv.ImageLabel
--local ItemName = inv.ItemName
inv.ItemName:GetPropertyChangedSignal("Text"):Connect(function()
print("Check 1")
if inv.ItemName.Text == "Wood" then
print("Check 2")
inv.ImageLabel.Image = "rbxassetid://6319951708"
end
end)
This perhaps? It’s quite odd since I never experienced this before
Unsure if this will do anything but replace this with
ImageLabel.Image = "http://www.roblox.com/asset/?id=6421015650"
Edit: @NotZylon Also is there a reason why it’s in StarterGui? Why can’t it just be the child of your UI?
Zylon mentioned that the code works but is only changing the Image that’s in StarterGui, not the player’s
i dont think the probelm is the image id its just that i need it to change in player gui
oof still doesn’t work, it changed the gui in startergui not player again
i just put it there because i thought it would make sense but i could move it oif that helps
local gui = script.Parent
local inv = gui.InventoryGui.Templates.Item
--local ImageLabel = inv.ImageLabel
--local ItemName = inv.ItemName
inv.ItemName:GetPropertyChangedSignal("Text"):Connect(function()
print("Check 1")
if inv.ItemName.Text == "Wood" then
print("Check 2")
inv.ImageLabel.Image = "rbxassetid://6319951708"
end
end)
Try this? I acceidentally editted my old post instead of replying lmao
doesn’t it have to change the players gui? so wouldn’t that be playergui?
The guis in StarterGui are automatically parented to the Player’s PlayerGui, that’s why any scripts in PlayerGui repeat themselves when you respawn. So this and how you did it before are basically the same thing
it still only changes the startergui
It doesn’t change StarterGui, it changes your PlayerGui. Changes to StarterGui won’t replicated to clients
but whenever i try to the playergui it changes in startergui but not on playergui
What do you mean by that statement?
here are two separate images
here is the one in startergui when it changed the text
heres the one in playergui when the text changes