jojotyle
(tyty9009)
July 8, 2022, 3:19am
#1
Hi, I’m trying to make a painting similar to Bloxburg where you can enter the id and it will show up but every way I tried didn’t work. so I’m trying to see if anyone can help
If you need anything else please tell me
(this is the submit button local script)
script.Parent.MouseButton1Up:Connect(function()
local img = script.Parent.Parent.ID.ContentText
game.ReplicatedStorage.flags:FireServer(Imageimg)
end)
Could you show your entire local and server script code?
jojotyle
(tyty9009)
July 8, 2022, 3:35am
#3
jojotyle:
Imageimg
sure
here the script where the event leads to
game.ReplicatedStorage.flags.OnServerEvent:Connect(function(plr,img)
local flags = plr.Character.Head.flags
flags.Enabled = true
flags.Flag.Image = img
end)
script.flags.Parent = script.Parent.Head
hopefully that helps
I’m guessing img
is the raw ID itself.
You cannot just put an ID inside Image
, you need to concatenate both rbxassetid://
and img
together.
flags.Flag.Image = "rbxassetid://" .. img
jojotyle
(tyty9009)
July 8, 2022, 3:50am
#5
i just tryed that it’s still not showing so i looked in the image and it shows that its there but its not showing up
Is the ImageLabel
even visible? Can you try adding an image to it manually and see if it shows up?
jojotyle
(tyty9009)
July 8, 2022, 3:53am
#7
yes it is visible i just added the same image manually and it showed up
Huh, that’s really weird.
I tested it out on a default baseplate and it worked for me. Are you sure the script is editing the right ImageLabel
?
jojotyle
(tyty9009)
July 8, 2022, 4:00am
#9
how are you doing it because this is how I’m doing it
Downrest
(Down)
July 8, 2022, 4:01am
#10
I’m testing it with this script:
local RS = game:GetService("ReplicatedStorage")
local image = workspace.Part.SurfaceGui.ImageLabel
local decals = {5365990711, 1560823444, 6018156837, 6616948430, 876171815}
while true do
image.Image = "rbxassetid://" .. decals[math.random(1, #decals)]
task.wait(2)
end
jojotyle
(tyty9009)
July 8, 2022, 4:05am
#11
can you try with an input
like a decal id
Downrest
(Down)
July 8, 2022, 4:53am
#12
This does give an input, it gets an random decal ID from the decals
array.
local decals = {5365990711, 1560823444, 6018156837, 6616948430, 876171815}
script.Parent.Parent.ID.ContentText
I don’t think it should be ContentText?
Shouldn’t it just be Text
Also,
game.ReplicatedStorage.flags:FireServer(Imageimg)
should probably be
game.ReplicatedStorage.flags:FireServer(img)
jojotyle
(tyty9009)
July 8, 2022, 5:12am
#14
yea i accidentally typed that but i changed it back and it’s still not working lol
Did you also try changing ContentText to Text?
mkn00b
(mkn)
July 8, 2022, 5:15am
#16
does it give a error?, that is the most easy way to find the bug
jojotyle
(tyty9009)
July 8, 2022, 5:15am
#17
just did it and the same thing
jojotyle
(tyty9009)
July 8, 2022, 5:15am
#18
No that’s why its so confusing
Can you print out the value of img
in the server script?