You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I want to find out why this error is occurring and fix the error -
What is the issue? Include screenshots / videos if possible!
this error is occurring: 17:06:50.195 Players.LolBloxLolxxxx.PlayerScripts.PopupScript:47: attempt to call a Instance value - Client - PopupScript:47 -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I have looked online and haven’t found a solution that works
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
player=game.Players.LocalPlayer
tweenService = game:GetService("TweenService")
tweenInfo = TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.InOut)
RS=game.ReplicatedStorage
moduleSc = require(RS.Abbreviate)
ov=player:WaitForChild('OV')
Strength=ov.Strength
Vitality=ov.Vitality
Speed=ov.Vitality
Insights=ov.Insights
Values={
previousInsights = player.OV.Insights.Value,
previousSpeed = player.OV.Speed.Value,
previousVitality = player.OV.Vitality.Value,
previousStrength = player.OV.Strength.Value}
local function Popup(newValue, variable)
Popup=game.ReplicatedStorage.Popups[tostring(variable).."Popup"]:Clone()
Popup.Parent=player.PlayerGui.ScreenGui
local previousValue=Values["previous"..variable]
print(previousValue)
local textFadeTween = tweenService:Create(Popup, tweenInfo, {TextTransparency = 1})
local variableGained = math.floor(newValue - previousValue)
if variableGained<0 then
Popup.Text=variable..moduleSc.abbreviate(variableGained)
else
Popup.Text=variable.."+"..moduleSc.abbreviate(variableGained)
end
Popup.TextTransparency=0
Popup.Position=UDim2.new(math.random(300,700)/1000,0,math.random(500,750)/1000,0)
Popup.Rotation=math.random(-15,15)
wait(0.35)
textFadeTween:Play()
Popup:TweenPosition(
UDim2.new(Popup.Position.X.Scale,0,Popup.Position.Y.Scale+0.1,0),
"InOut",
"Quint",
0.3)
end
Insights.Changed:Connect(function(number)
Popup(number,"Insights")-- error occurs second time
end)
plz help