i need help. im trying to fire the remote event if player touched an npc. i dont know whats wrong with it
local Camera = game.Workspace.CurrentCamera local Player = game.Players.LocalPlayer local function onTouch(hit) game.ReplicatedStorage.ChangeChar:FireServer(game.ReplicatedStorage.Dummy) Camera.CameraType = "Custom" if Player.Character and Player.Character:FindFirstChild("Torso") then Player.Character.Torso.CFrame = CFrame.new(-24.392, 2, -6.694) Player:SetPrimaryPartCFrame(-24.392, 2, -6.694) end end script.Parent.Touched:Connect(onTouch)