Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

My script That sets an image to an image you clicked doesn't work, Help Anyone?

Asked by
NSMascot 113
5 years ago
1local event = game.ReplicatedStorage.Events.Tattoo
2 
3event.onServerEvent:Connect(function(player)
4    print("recieved event")
5        workspace[player.Name].ChestPieceCore.Tattoo.TImage.Image = player.PlayerGui.CGUI.MainFrame.Tattoos.WhichTattoo.Value
6    print("changed image")
7end)

So this script is an event everything works, all locations of things are right, both of the lines that should print, they print, if you want to know this is what the script does, It recieved event, prints "recieved event", and then its supposed to set a image(TImage) in a surfacegui(Tattoo) to a string value that in the local script the string value text gets set to the image address of the image you clicked, here is the local script if it helps,

1local event = game.ReplicatedStorage.Events.Tattoo
2 
3function leftClick(mouse)
4event:FireServer()
5script.Parent.Parent.WhichTattoo.Value = script.Parent.Image
6end
7script.Parent.MouseButton1Click:connect(leftClick)

If you don't understand or have any questions, just ask, thankyou for your help, NSMascot

0
Shouldn't it be FindFirstChild instead of workspace[player.Name] Jexpler 63 — 5y
0
thanks for the help, but it doesn't work, ;( NSMascot 113 — 5y

Answer this question