I'm making a game with guis (screenguis) and when I place a text box in my gui when I change the text it randomly goes back to it's initial text. This has gotten very annoying and I can't find the source of the problem.

UPDATE; If it's a broken script, my script is working fine. But I'm gonna post it here anyways because I can't find any problems in my game.

local p = script.Parent.Parent.Parent.Parent.Parent
local as = game:GetService("AssetService")

script.Parent.MouseButton1Click:connect(function()
	local ds = game:GetService("DataStoreService"):GetDataStore("port--" .. script.Parent.Parent.add.Text)
	script.Parent.Parent.load.Visible = true
	local name = script.Parent.Parent.ipp.Text
	local place = nil
	script.Parent.Parent.load.ImageLabel.Image = "rbxassetid://234370067"
	script.Parent.Parent.load.TextLabel.Text = "Loading place..."
	if ds:GetAsync(name) == nil then
		place = as:CreatePlaceAsync("Building place", 518338357, "lol i got cr1pping d3pressi0nn..")
		ds:SetAsync(name, place)
	else
		place = ds:GetAsync(name)
	end
	script.Parent.Parent.load.TextLabel.Text = "Teleporting to place..."
	script.Parent.Parent.load.ImageLabel.Image = "rbxassetid://279548030"
	game:GetService("TeleportService"):Teleport(place, p)
end)

UPDATE 2; This script is a server script that's inside of a button.

3 comments

0

This doesn't look like a scripting problem, this is scripting helpers. You need to post your broken script here so we can try to fix it. This doesn't mean that we will do your whole script for free.

0

TextBoxes don't automatically do this, so somewhere you have a faulty script.

0

Ok. I put script in my question. Please help. I checked over and over again to find problems but I can't figure out what I'm doing wrong.