Every time I wanted to test out my game it simply just stops at 33%, i'm not sure if its my scripts causing the studio to bugging out.
--start of script local sservice = game.ServerScriptService if script.Parent ~= sservice then script.Parent = game.ServerScriptService end --wait() can screw banservice check local Bstat = game:GetService("DataStoreService"):GetDataStore("BanService_1") local Wstat = game:GetService("DataStoreService"):GetDataStore("BanService_1") local Rstat = game:GetService("DataStoreService"):GetDataStore("BanService_1") --create ui message when ban/warning is true --[[ local ReasonMessageValue = Instance.new("StringValue")--finish this man local storedDatas = Instance.new("Folder") storedDatas.Parent = game.ServerScriptService ReasonMessageValue.Parent = storedDatas ReasonMessageValue.Value = "nil" ReasonMessageValue.Name = "Value" ]]-- Waste of time, idea discarded --function sendval() --end --function sendtoui() --end game.Players.PlayerAdded:connect(function(player) local Banned = "user_" ..player.userId local Warning,Reason = "user_" ..player.userId if Bstat:GetAsync(Banned) == 1 then ReasonMessageValue.Text = ReasonMessageValue kick() end end)
I had something similar happen to me. My problem was that i didn't have wait() in the script, and this apparently made the studio freeze when i tried to test.
while true do --wait() was missing --some other codes end
Maby try this:
if script.Parent ~= sservice then wait() --try to add this and see if that helps script.Parent = game.ServerScriptService end
Alright, first of all, userId is deprecated, use UserId instead, also you should be using Connect instead of connect.
~~~~~~~~~~~~~~~~~ --start of script
local sservice = game.ServerScriptService
if script.Parent ~= sservice then script.Parent = game.ServerScriptService end
--wait() can screw banservice check
local Bstat = game:GetService("DataStoreService"):GetDataStore("BanService_1") local Wstat = game:GetService("DataStoreService"):GetDataStore("BanService_1") local Rstat = game:GetService("DataStoreService"):GetDataStore("BanService_1")
--create ui message when ban/warning is true
--[[ local ReasonMessageValue = Instance.new("StringValue")--finish this man local storedDatas = Instance.new("Folder") storedDatas.Parent = game.ServerScriptService ReasonMessageValue.Parent = storedDatas ReasonMessageValue.Value = "nil" ReasonMessageValue.Name = "Value" ]]-- Waste of time, idea discarded
--function sendval() --end
--function sendtoui() --end
game.Players.PlayerAdded:Connect(function(player) local Banned = "user_" ..player.UserId local Warning,Reason = "user_" ..player.UserId pcall(function() if Bstat:GetAsync(Banned) == 1 then ReasonMessageValue.Text = ReasonMessageValue kick() end) end end) ~~~~~~~~~~~~~~~~
Still stuck at 33%. I've rewritten the script with no errors and bugs and my studio stops at 33% when testing