I was notified days ago that people were randomly freezing - were unable to move the character - but were able to move the camera and use shift lock to turn the character. I suspect that it is the teleporting to spawns that causes this, as a similar issue would happen where I would create an unanchored ball and it would stay stuck in the air for a prolonged gperiod of time.
I am not sure, and I have not found anything similar so far.
Update - I tried this on a jeep and the wheels turned but it didn’t move for the same prolonged time, as if the character were anchored.
Was this a Roblox Jeep? I know some of their vehicles in a test race track they had in about 2015 actually had Humanoid controllers which may cause the issue you see.
What are you doing to the player with your script(s). You need to post the script so we can see what you are doing to the player. Also please post scripts with 3 backticks (```) before and after them so they format properly here.
The script is quite long, but you asked for it. (the teleporting part is mostly at the top)
local PlayerData = {}
local teams = require(workspace.GameData.TeamDataBackUp)
game.Players.PlayerAdded:Connect(function(Player)
Player:WaitForChild("leaderstats"):WaitForChild("_Ready")
local vs = Instance.new("StringValue",Player)
vs.Name = "VisitingStage"
vs.Value = Player.Team.Name
PlayerData[Player] = teams[2][Player.Team.Name]
if Player.Team.Name == "Lobby" then
PlayerData[Player] = 1
vs.Value = "Lobby"
elseif Player.Team.Name == "Finale" then
PlayerData[Player] = game.Teams.Finale.Stage.Value
end
Player:GetPropertyChangedSignal("Team"):Connect(function()
vs.Value = Player.Team.Name
if Player.Team == game.Teams.Lobby then
PlayerData[Player] = 1
end
end)
Player.CharacterAdded:Connect(function(c)
task.wait()
c:WaitForChild("HumanoidRootPart").CFrame = (vs.Value == "Lobby" and workspace.Lobby.Spawns[tostring(math.random(1,24))].CFrame or workspace.Spawns:FindFirstChild(vs.Value).CFrame) * CFrame.new(0,3.025,0)
end)
end)
function isDupe(Player,SpawnName)
return PlayerData[Player] == teams[2][SpawnName] or false
end
function SendMessage(Player,Spawn,Admin)
local s,e = pcall(function()
if Player and (isDupe(Player,Spawn.Name) == false) or Admin then
if (PlayerData[Player]) == (teams[2][Spawn.Name] - 1) or Admin then
PlayerData[Player] = teams[2][Spawn.Name]
Player.Team = game.Teams:WaitForChild(Spawn.Name)
Player:WaitForChild("VisitingStage").Value = Spawn.Name
local SpawnColor = Spawn.Color
local SpawnName = Spawn.Name
if Player:FindFirstChild("leaderstats") and Player:WaitForChild("leaderstats"):FindFirstChild("_Ready") then
if SpawnName == "Finale" then
game.ReplicatedStorage.Remotes.IsFinalReached:FireClient(Player)
end
game.ReplicatedStorage.Remotes.Message2:FireClient(Player,SpawnName,SpawnColor)
game.ReplicatedStorage.Remotes.Message:FireAllClients(Player.Name.." has reached "..SpawnName.." stage!",SpawnColor)
end
elseif not Admin and (PlayerData[Player] or 1) >= teams[2][Spawn.Name] then
Player:FindFirstChild("VisitingStage").Value = Spawn.Name
end
else
warn("Stage completion: ",isDupe(Player,Spawn.Name))
end
end)
if e then print(e)end
end
game.ReplicatedStorage.TOoHR_AC.CheckpointEvent.Event:Connect(SendMessage)
for i,s in pairs(script.Parent:GetChildren())do
if s:IsA("BasePart") and game.Teams:FindFirstChild(s.Name)then
s.Touched:Connect(function(o)
SendMessage(game.Players:GetPlayerFromCharacter(o.Parent),s)
end)
end
end
game.ReplicatedStorage.Remotes.VisitStage.OnServerEvent:Connect(function(p,s,r)
local n = teams[2][p.VisitingStage.Value]
local y = ""
if r == 0 then
n = teams[2][p.VisitingStage.Value]+s
if n == teams[2][p.Team.Name]+1 then
n = 1
end
if n <= 0 then
n = teams[2][p.Team.Name]
end
y = teams[1][n].Name
elseif r == 1 then
y = s
end
p.Character:WaitForChild("HumanoidRootPart").CFrame = (y == "Lobby" and workspace.Lobby.Spawns[tostring(math.random(1,24))].CFrame or script.Parent:FindFirstChild(y).CFrame) * CFrame.new(0,3.025,0)
p:WaitForChild("VisitingStage").Value = y
end)
local function AdminData(Player)
PlayerData[Player.Name] = Player.Team.Name
end```
I only think its to do with teleporting because I had the similar issue (previously stated). This couldn’t be roblox as this is the only game this happens in to my knowledge.
It sounds like it may be a NetworkOwnership issue. Similar things happen in physics related games where items that aren’t anchored won’t move but then when you get close the NetworkOwnership passes to the Client and they move again.
I can’t say where this code causes the issue though. Is there any lag in the game while this is occurring?
I am teleporting on the server specifically for streaming enabled. I have had this update released for maybe a month and it was only the past week when this was found. If it is about network ownership, is the default network owner of the character the server or the client?
Exactly? Was it to do with teleporting?
Okay so, I thought maybe that since I was teleporting the character right after it spawned, the character glitches like that. I put a normal spawn location and it didn’t change a thing.
Try it without StreamingEnabled to see if that’s the issue.
With StreamingEnabled check out the section about Requesting Area Streaming to load in areas around the player that aren’t already loaded in.
I forgot to mention, this recurs even after the player has respawned. The humanoid state settings are unchanged.
This was the cause, but I am already teleporting using stream requests as documented. I am, however, setting the replication focus for a camera moving scene but I do set it back to its original.
I figured out it was the camera moving scene loop that was frequently stream requesting.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.