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
4 years ago
local event = game.ReplicatedStorage.Events.Tattoo

event.onServerEvent:Connect(function(player)
    print("recieved event")
        workspace[player.Name].ChestPieceCore.Tattoo.TImage.Image = player.PlayerGui.CGUI.MainFrame.Tattoos.WhichTattoo.Value
    print("changed image")
end)

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,

local event = game.ReplicatedStorage.Events.Tattoo

function leftClick(mouse)
event:FireServer()
script.Parent.Parent.WhichTattoo.Value = script.Parent.Image
end
script.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 — 4y
0
thanks for the help, but it doesn't work, ;( NSMascot 113 — 4y

Answer this question