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

Text Label Not Changing Text Properly?

Asked by 3 years ago
Edited 3 years ago

I made a morphing button, and I want it so that when you press it and morph the label says unmorph, and vice - versa. However, the label just changes to unmorph for a split second then immediately goes back to morph. This is in a local script. Could someone help? I've tried a while loop and it does the same thing.

local repstore = game:GetService("ReplicatedStorage")
local rev = repstore:WaitForChild("CharMorph")
local player = game.Players.LocalPlayer
local morpher = script.Parent:WaitForChild("Morpher")
local txtb = script.Parent.Button:WaitForChild("MorphLabel")

morpher.MouseButton1Click:Connect(function()
    if txtb.Text == "MORPH" then
        txtb.Text = "UNMORPH"
        rev:FireServer(player)
    end
end)
0
Can you provide the code that changes the text to morph? this part of the code is correct Leamir 3138 — 3y
0
The label text is morph by default in the properties. zazazazazazazazaza21 0 — 3y

Answer this question