Oh yes now it works completely without any errors yay thanks a lot
char limit_________________________
oh wait uh oh the script has a problem checking if the code is correct
when I type the correct code it doesn’t work ( I think I can fix this though if I have any problems i’ll make another reply)
I think it might just be a referencing problem or typo
i forgot to change back 1 thing maybe thats whats causing the prob
--script
local CodeValue = script.Parent.Parent.Parent.Parent.Parent.PC.Screen.Code
game.ReplicatedStorage.EnableKGUI.OnServerEvent:Connect(function(player,complete)
local GUI = player.PlayerGui.KeycodeGUI
GUI.Done.Value=complete
if GUI.Done.Value == true then
print("User has given a code")
if GUI.Frame.Frame.CodeSee.Text == CodeValue.Value then
print("CORRECT")
else
print("INCORRECT")
end
end
end)
script.Parent.Prompt.Triggered:Connect(function(player)
game.ReplicatedStorage.EnableKGUI:FireClient(player)
end)
--local
local KGUI = game.Players.LocalPlayer.PlayerGui.KeycodeGUI
local Chiffre = KGUI.Frame.Frame.CodeSee
local frame = script.Parent.Frame.Frame.Frame
game.ReplicatedStorage.EnableKGUI.OnClientEvent:Connect(function()
KGUI.Enabled = true
KGUI.Frame:TweenPosition(UDim2.new(0,0,0,0),"Out","Back",1,false)
end)
KGUI.Frame.X.MouseButton1Click:Connect(function()
KGUI.Enabled = false
end)
for i ,key in pairs(frame:GetChildren()) do
if string.find(key.Name, "Key") then
key.MouseButton1Click:Connect(function()
Chiffre.Text ..= string.match(key.Name, "%d")
end)
elseif key.Name == "Back" then
key.MouseButton1Click:Connect(function()
Chiffre.Text = string.sub(Chiffre.Text,1,0)
end)
elseif key.Name == "Enter" then
key.MouseButton1Click:Connect(function()
script.Parent.Done.Value = true
game.ReplicatedStorage.EnableKGUI:FireServer(script.Parent.Done.Value)
end)
end
end
local CodeValue = script.Parent.Parent.Parent.Parent.Parent.PC.Screen.Code
game.ReplicatedStorage.EnableKGUI.OnServerEvent:Connect(function(player,complete,text)
local GUI = player.PlayerGui.KeycodeGUI
GUI.Done.Value=complete
GUI.Frame.Frame.CodeSee.Text =text
if GUI.Done.Value == true then
print("User has given a code")
if GUI.Frame.Frame.CodeSee.Text == CodeValue.Value then
print("CORRECT")
else
print("INCORRECT")
end
end
end)
script.Parent.Prompt.Triggered:Connect(function(player)
game.ReplicatedStorage.EnableKGUI:FireClient(player)
end)
--local
local KGUI = game.Players.LocalPlayer.PlayerGui.KeycodeGUI
local Chiffre = KGUI.Frame.Frame.CodeSee
local frame = script.Parent.Frame.Frame.Frame
game.ReplicatedStorage.EnableKGUI.OnClientEvent:Connect(function()
KGUI.Enabled = true
KGUI.Frame:TweenPosition(UDim2.new(0,0,0,0),"Out","Back",1,false)
end)
KGUI.Frame.X.MouseButton1Click:Connect(function()
KGUI.Enabled = false
end)
for i ,key in pairs(frame:GetChildren()) do
if string.find(key.Name, "Key") then
key.MouseButton1Click:Connect(function()
Chiffre.Text ..= string.match(key.Name, "%d")
end)
elseif key.Name == "Back" then
key.MouseButton1Click:Connect(function()
Chiffre.Text = string.sub(Chiffre.Text,1,0)
end)
elseif key.Name == "Enter" then
key.MouseButton1Click:Connect(function()
script.Parent.Done.Value = true
game.ReplicatedStorage.EnableKGUI:FireServer(script.Parent.Done.Value,Chiffre.Text)
end)
end
end
soooo many edits
whelp it’s still not working oof
i am making something similar(char limit___________)
OH I know the value is 0 for some reason
It has to wait for the code value to get a code and then use it
I checked the script and it seems that this is the problem:
no worries i am making something similar
done ill upload the place
1 sec checking
you’re making a similar door code ??
oh okay
the same system charlimit________
oh wow it works ! Oh also how do you inform to the player that it is incorrect ? I want to make this but I don’t really know how (should you make it on the server side or client side)
let me see(give me few sec) char_________
okay! Thanks again for helping me
replace code below with the print ‘incorrect’ statement
print("Incorrect")
keycode_Gui.Frame.TextBox.Text="Error" --first display error by cahnging the text
keycode_Gui.Frame.TextBox.TextEditable=false --Disable TextEditable property of textbox
wait(1)--wait a sec
keycode_Gui.Frame.TextBox.Text="" --change the text back to empty string
keycode_Gui.Frame.TextBox.TextEditable=true --Enable TextEditable property of textbox
Thanks a lot! I gotta attend a zoom class so I have to go
i’m sending a reply to see everything working after class
Actually wait i’m going to make another post since you fixed the initial problem but now I have another one, thanks
please post it seperately if i can ill reply whenever i can
it’s more efficient that way