I checked through the website and all of the results i wanted didnt help fix my issue so i am now asking for help. I am having an issue with a gui changing script where the printing works properly but hte GUI doesnt update at all. the code is:
--instances
local Player = game:GetService("Players").LocalPlayer
local Text = script.Parent.Text
local Color = script.Parent.TextColor
local Textchange = script.Parent.TextChange
--functions
local function SetText(Ammo, Ammocap)
print(Ammo.."/"..Ammocap)
print("before if argument")
if Ammo / Ammocap < 1.5 then
Color = Color3.new(0.807843, 0, 0)
print("in if argument")
end
print("after if argument")
Text = Ammo.."/"..Ammocap
end
--function connects
Textchange.Event:Connect(function(Ammo, Ammocap)
print("triggered Bindable Event")
SetText(Ammo, Ammocap)
end)
alos i am certain that all of my instances are correct, hte text just doesnt update correctly

4 comments
just so everyone knows all of the prints are to check bugs
just so everyone knows all of the prints are to check bugs
The names of the instances are properties and the script will get confused
what do you mean the script will get confused? the Ammo and Ammocap are numbers all the time so it should work