Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Value to TextLabel i guess?

Asked by 3 years ago
Edited 3 years ago

Im trying to make a text label when your iq (leaderstat) is 100 or more Local script changes the text

Code:

local required = 100

local stat = game.Players.LocalPlayer.leaderstats.IQ

local text = script.Parent

-- Variables

stat.Changed:Connect(function()

if stat.Value >= required then

text.Text = "CODE1234"

end

end)

-- Script

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago
local required = 100

local stat = game:GetService("Players").LocalPlayer.leaderstats.IQ.Value

-- Variables

stat.Changed:Connect(function()

if stat.Value >= required then

game.Workspace.[PartName].[SurfaceGuiname].[TextLabelName].Text = "CODE1234"

end

end)

put this code inside a normal script and see if it works

Ad

Answer this question