You can write your topic however you want, but you need to answer these questions:
I’ve have this bug, which I’ve been trying to fix for a few days, but I couldn’t figure out what to do. I realised that the local scripts wasn’t in one of the players (or more), for some reason… I’ve played with my brother, not on the local server but in the game itself, and it’s not working as intended. It should be that when your blind, you shouldn’t be able to die
-- RayCast Script
local uis = game:GetService("UserInputService")
local rs = game:GetService("RunService")
local camera = workspace.CurrentCamera
local item = nil
local RS = game:GetService("ReplicatedStorage")
local function CreateRayCast()
local mousePosition = uis:GetMouseLocation()
local raycast = camera:ViewportPointToRay(mousePosition.x, mousePosition.y)
local rcResult = workspace:Raycast(raycast.Origin,raycast.Direction * 10000 )
return rcResult
end
uis.InputBegan:Connect(function(input, proc)
if input.UserInputType == Enum.UserInputType.MouseButton1 and not proc then
if item:IsA("BasePart") then
if item.name == "HumanoidRootPart" or item.name == "Torso" then
local RaycastPlayer = game.Players:GetPlayerFromCharacter(item.Parent)
game.ReplicatedStorage:WaitForChild("KillPlayer"):FireServer(RaycastPlayer)
print(RaycastPlayer.Name .. " Local")
end
end
end
end)
rs.RenderStepped:Connect(function()
local result = CreateRayCast()
if result and result.Instance then
item = result.Instance
end
end)
-- E to blind script
local db = false
local dbTimer = 1
local WalkSpeedWhileBlind = 5
game.UserInputService.InputBegan:Connect(function(inp, proc)
if proc == true then return end
if db == true then return end
db = true
if inp.KeyCode == Enum.KeyCode.E then
print("press e")
-------------
game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed = WalkSpeedWhileBlind
-------------
game.ReplicatedStorage:WaitForChild("EToBlind"):FireServer()
end
task.wait(dbTimer)
db = false
game.Players.LocalPlayer.Character:WaitForChild("Humanoid").WalkSpeed = 16
end)
I think the local scripts are not replicating because it’s not showing in other players, but I could be wrong.
What do you mean “not showing”? The whole point of a Local Script is it does something specifically for that client, unless it edits something it has network ownership of. That’s probably why it’s not replicating.
Nevermind, your right. I just checked right now, the PlayerScripts only show up for your client. Should I make a new topic for the original problem, " It should be that when your blind, you shouldn’t be able to die"?