Hello!
I have been working on a top down game which has jumping disabled it has a look at mouse script.
(I am including this information because I think it might be relevant to the issue)
Basically, when the player gets above y6 they get sent to y 3.4[a bunch of numbers inbetween]e+38 and they die. Sometimes they wont respawn and will just be shown floating on other players’ screens, but on the victim’s screen will be in the void.
So the current information does not allow to give an answer, you probably expected it. Can you show the script that disables jumping or any other script that might be relevant to the issue? If you’re simply making the player’s jump power 0 then I see no problem with the disable jumping script. Try checking for script that affect the y position of the player, look for errors and resolve them if there is.
sorry about that, here is code I found that edit’s the player’s Y level
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Root = Character:WaitForChild("HumanoidRootPart")
local Mouse = Player:GetMouse()
local RunService = game:GetService("RunService")
RunService.RenderStepped:Connect(function()
local RootPos, MousePos = Root.Position, Mouse.Hit.Position
Root.CFrame = CFrame.new(RootPos, Vector3.new(MousePos.X, RootPos.Y, MousePos.Z))
end)
This is the only script in my game that has anything to do with the player’s Y axis. I have been very confused because I have no clue what could cause this.
Nice! However, are you sure this script is causing the problem? I read it, and it doesn’t change the character’s position in any way. It just access the player’s position (not change it) to calculate where the camera would be.
I tried both of your suggestions, but for some reason the glitch still occurs. Something that confuses me about it is that the camera just follows the player so how is it causing the bug?
I understand how you’re feeling. Weird, huh? How about instead of render.stepped for both of your scripts, try using long wait times (as an experiment) like task.wait(0.1) and task.wait(0.15) so both scripts don’t conflict:
1st script is accessing mouse position to calculate head CFrame.
2nd script is editing camera that affects house position based on head CFrame
you get what I’m saying? Both scripts are causing some kind of loop… I’m not too sure if this might be causing it but perhaps you could see if it’s it?
Yeah, I understand. Tested it, but sadly, nothing. For even more assurance, I tested the game without the camera and it does work. I am currently trying to see if it has something to do with the part…