it doesnt work neverless. are you saying if i changed it to that it would work and how it is right now is flawed?
Sorry, you might wanna check it out again. I accidentally put typos in there.
it doesnt work. no errors the image just wont change.
nvm the error is Image https://assetdelivery.roblox.com/v1/asset?id=8065742524 failed to load. Error 403: Asset type does not match requested type
full thing is
19:46:49.704 Stack End - Studio
19:46:53.265 Image https://assetdelivery.roblox.com/v1/asset?id=8065743918 failed to load. Error 403: Asset type does not match requested type - Studio
19:46:53.383 Image https://assetdelivery.roblox.com/v1/asset?id=8065741478 failed to load. Error 403: Asset type does not match requested type - Studio
19:46:53.470 Image https://assetdelivery.roblox.com/v1/asset?id=8065742524 failed to load. Error 403: Asset type does not match requested type - Studio
19:46:53.590 Image https://assetdelivery.roblox.com/v1/asset?id=8065739974 failed to load. Error 403: Asset type does not match requested type - Studio
19:46:53.682 Image https://assetdelivery.roblox.com/v1/asset?id=8065734219 failed to load. Error 403: Asset type does not match requested type - Studio
19:46:53.797 Image https://assetdelivery.roblox.com/v1/asset?id=8065737551 failed to load. Error 403: Asset type does not match requested type - Studio
19:46:53.914 Image https://assetdelivery.roblox.com/v1/asset?id=8065735589 failed to load. Error 403: Asset type does not match requested type - Studio
19:46:53.986 You Won! - Client - stuff workin:50
19:46:54.037 Image https://assetdelivery.roblox.com/v1/asset?id=8065738734 failed to load. Error 403: Asset type does not match requested type - Studio
you know im trying to get images not models right?
Look in thé proprieties if you correcly took the good proprieties
bro which properies what? You mean open all the properties?
so you want me to make a script in workspace then to remote function then to add that function above my main coinflip function with a end right
edit: why is it so hard to change an image? it was working fine before i tryed to make an animation where it popped an image up and i didnt have to make remote functions.
why cant i just change the image through the local script
would it be better if i uploaded a model of my workspace and u edited it until it worked
Ok i know am bad at explaining but here: you see for exemple you want to put à songId in à audio thing you do audio.ID or something Like that but Try to do thé same thing With that Like go find the proprieties you nead
Or Just look With your image if its not thé image that is bugged
i am able to change the image fine. look at the video i made and u can see that i showed myself changing the image to the link in worksdpace and it wokring
Sorry i cant see it i am on mobile right now
ok i just tested and the asset id thing isnt working when i do it manually. do ill try doing links again
Look if its not Like idk because its in a frame or something! :DDD
asset id isnt even working manually.
local imagehead14 = “4B051671-A9F7-4645-B629-6540BD083C3F - Roblox”
local imagehead13 = “9A601A47-1859-4F5D-B2B7-47277AFD9BA7 - Roblox”
local imagehead12 = “16046D7A-57FA-4810-9DAD-3A005D5CABF6 - Roblox”
local imagehead1 = “DFFC1914-62AB-4FE7-8234-300EFE2A33F6 - Roblox”
local imagetail14 = “6FE94EBA-E74D-44ED-8E94-6DEA388ACD90 - Roblox”
local imagetail13 = “020DE5A9-A473-4195-8E8C-D524E4AF4288 - Roblox”
local imagetail12 = “8E4D9A56-9BF0-4731-AE5E-AF412FB81D3A - Roblox”
local imagetail1 = “70A74D65-AF8C-444F-9B01-1DDEAABF9D82 - Roblox”
edit: Big news and good news! i changed the image to something and when i ran the script it made the image blank white. this is good becuase it means its changing the image and now we know the issue is to due with the image formatting when creating the variable OR when i change the image. it could be that it runs so fast im not able to see as well
edit: i just tested again and its not that it ran to fast. this means i messed up format somewhere and it returned nil
Sadly to understand RemoteFunctions you need to understand Server VS Client.
Server is what your game knows- everything in the Workplace and not on the Player.
Client is what your player’s settings know- everything within the Player (PlayerGui, etc).
Properties are also a term you should get to know a bit before scripting, but for simplicity’s sake, they’re anything that can change how a part, decal, frame, etc. works, looks, etc.
Part.Color, for example- the Color of a Part is a Property of the Part. It’s like how Children work, but Properties define their Parent.
RemoteFunctions are hard to understand on your first try.
Remember to call these at the start of any script that needs them.
(Frankly, I’m not even sure why we’re calling MarketplaceService… You could just type the IDs in normally.)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteFunction = ReplicatedStorage.[Name of the RemoteFunction]
local MarketplaceService = game.GetService("MarketplaceService")
local DecalID = [the parent of coinflip].coinflip.Frame.ImageLabel.Image
Anyway, on a physical part (not a GUI like you want to), I’d probably do something like this (note this is not a full script- I’m an artist, not a scripter- and this is using an infinite loop and the timing will be off):
local Part = script.Parent -- assuming you parent the script into the Part
local Decal = Part.Decal
while true do
wait(0.1)
Decal.Transparency = 0 -- makes the decal visible
Decal.Texture = "frame1" -- replacing frame1 with the asset ID of your decal's first frame
wait(0.1)
Decal.Texture = "frame2" -- and frame2 with the second...
wait(0.1)
Decal.Texture = "frame3"
wait(0.1)
Decal.Texture = "frame4"
-- rinse and repeat the wait() and Decal.Texture
-- when you reach the last frame:
Decal.Texture = "framelast" -- in the real script, you'd want your last frame to be the heads or the tails showing face up
wait(3)
Decal.Transparency = 1 -- makes the decal invisible
-- you could also Destroy() the decal if you wanted to
-- Decal:Destroy()
Check out Changing Decal Texture and DEFINITELY ImageLabel.Image.
You might also consider Image Animation Using Spritesheets.
why would i be getting the decal from a part? the entire objective is not to animate a part nor get an image from any part but to only use gui. texture isnt used in guis if thats what you meant and only image labels have the ability to have “Texture.” the proper term is “Image” and it should be easy but its just not working for me. and im prety sure that local scripts can edit images just fine so like i said it has nothing to do with client but the fact that i messed up the ids somehow since the script does change the image but instead of the image i want it changes it to a white screen
edit oh were you refering to if i had decals in workspace as texture? but you said decal was script.parent and the script cant be in multiple textures plus its mroe effience if i just got the id from robloxs library instead of workspace
… It was just an example. I specifically said it wasn’t for a GUI like you want it to be.
Seeing how it works on other things can just be helpful sometimes.
Again, I’m an artist, not a scripter. I can’t really help you further than that.
But definitely look into the links I sent. Particularly ImageLabel.Image.
That’s my ten cents.
its a lot different. all parts can have textures but in gui only image button and label can have a texture. the way you change the texure in a script is just by saying that its property, image = (id)
Yes, I know this.
It’s not actually that different. Decals and ImageLabels are the same thing, just that one is on a Part and the other is on a GUI. It’s just location and name differences, otherwise they do the same thing. That’s why I bring Parts up.
You can definitely accomplish something similar to what I wrote there with GUIs, is what I mean. I’m more throwing that out there for anyone that may want to help you later, so they understand what you mean/want.
It’s frame-by-frame animation either way, just with a little extra math.
Okay, you need to define everything. Where it says RemoteFunction you need to type where you put the RemoteFunction.
You are having the same issue I had a while ago, but basically you cannot use a script to set the image of a ImageLabel to a decal. The code I gave you will convert the decal into an image that your script can use.
local imagehead14 = "rbxassetid://8065738715"
local imagehead13 = "rbxassetid://8065737537"
local imagehead12 = "rbxassetid://8065735565"
local imagehead1 = "rbxassetid://8065734208"
local imagetail14 = "rbxassetid://8065739962"
local imagetail13 = "rbxassetid://8065741456"
local imagetail12 = "rbxassetid://8065742517"
local imagetail1 = "rbxassetid://8065743902"
local images = {imagetail1, imagetail12, imagetail13, imagetail14, imagehead1, imagehead12, imagehead13, imagehead14}
local Players = game:GetService("Players")
local npc = script.Parent:WaitForChild("TextLabel")
local guiframe = script.Parent
local imagelabel = script.Parent:WaitForChild("ImageLabel")
local bet = imagelabel.Status:WaitForChild("Bet")
local tails = bet:WaitForChild("Tails")
local heads = bet:WaitForChild("Heads")
local ubet = bet:WaitForChild("YouBet")
local cs = bet:WaitForChild("coinSide")
local player = Players.LocalPlayer
local cash = player:WaitForChild("leaderstats"):WaitForChild("Cash")
local cd = true
function main()
for index, image in ipairs(images) do
imagelabel.Image = image
task.wait(0.2)
end
local chance = math.random(1, 30)
if chance >= 14 and cs.Value == "Heads" then
imagelabel.Image = imagehead14
print("You Won!")
cash.Value += tonumber(ubet.Text)
elseif chance >= 14 and cs.Value == "Tails" then
imagelabel.Image = imagetail14
print("You Won!")
cash.Value += tonumber(ubet.Text)
elseif chance <= 14 and cs.Value == "Tails" then
imagelabel.Image = imagehead14
print("You Lost!")
cash.Value -= tonumber(ubet.Text)
elseif chance <= 14 and cs.Value == "Heads" then
imagelabel.Image = imagetail14
print("You Lost!")
cash.Value -= tonumber(ubet.Text)
end
task.wait(2)
cd = true
imagelabel.Image = ""
end
heads.MouseButton1Click:Connect(function()
if cd and tonumber(ubet.Text) ~= nil then
if tonumber(ubet.Text) <= cash.Value and tonumber(ubet.Text) ~= 0 then
cd = false
cs.Value = "Heads"
bet.Text = "Heads"
main()
end
end
end)
tails.MouseButton1Click:Connect(function()
if cd and tonumber(ubet.Text) ~= nil then
if tonumber(ubet.Text) <= cash.Value and tonumber(ubet.Text) ~= 0 then
cd = false
cs.Value = "Tails"
bet.Text = "Tails"
main()
end
end
end)
I would post a long paragraph but you’ve already received a lot of advice in this thread. Providing the gui is working and the references are defined correctly the above will work (replicating locally only).